<template>
  <!-- 人才发现页面 -->
  <div>
    <!-- 搜索页面 -->
    <el-form
      :model="peopleFoundSearch"
      size="small"
      :inline="true"
      class="query-form"
    >
      <el-form-item prop="realName">
        <el-input
          size="small"
          v-model="peopleFoundSearch.realName"
          autocomplete="off"
          placeholder="姓名"
        ></el-input>
      </el-form-item>
      <el-form-item prop="sex">
        <el-select
          size="small"
          v-model="peopleFoundSearch.sex"
          placeholder="性别"
          style="width: 100%"
        >
          <el-option label="男" value="男"></el-option>
          <el-option label="女" value="女"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item prop="phone">
        <el-input
          size="small"
          v-model="peopleFoundSearch.phone"
          autocomplete="off"
          maxlength="11"
          placeholder="电话"
        ></el-input>
      </el-form-item>
      <el-form-item prop="currentAddress">
        <el-cascader
          placeholder="选择所在地（省、市）"
          value="peopleFoundSearch.currentAddress"
          :props="{
            expandTrigger: 'hover',
            checkStrictly: true,
            label: 'name',
            value: 'name',
            children: 'children',
          }"
          size="small"
          ref="currentAddressChange"
          @change="handleChange"
          change-on-select
          clearable
          @click.native="handleSelect"
          :popper-class="'cascader1'"
          :options="valueData"
        >
        </el-cascader>
      </el-form-item>
      <el-form-item style="float:right">
        <el-button size="small" type="primary" @click="searchUsers"
          >查询</el-button
        >
        <el-button
          size="small"
          style="margin-left: 10px"
          @click="resetsearchUsers"
          >重置</el-button
        >
      </el-form-item>
    </el-form>
    <!-- 内容页面 -->
    <div style="background-color: #fff; padding: 10px">
      <!-- 按钮 -->
      <div>
        <el-button
          size="small"
          icon="el-icon-circle-close"
          @click="deselectUserFound()"
          >取消选择</el-button
        >
        <el-button size="small" icon="el-icon-right" type="success"
          >数据统计</el-button
        >
      </div>
      <!-- 人才发现数据表格 -->
      <div style="margin-top: 10px">
        <el-table
          :data="peopleFoundTable"
          @selection-change="selectiopeopleFound"
          height="calc(100% - 80px)"
          size="small"
          ref="UserFounds"
          :cell-style="cellStyle"
          style="border: 1px solid #d6cfe2; min-height: 380px"
          :header-cell-class-name="cellHeadStyle"
          :row-class-name="tableRowClassName"
          :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
          v-loading="peopleFoundLoading"
          row-key="id"
          class="table"
        >
          <el-table-column type="selection" width="55" align="center"></el-table-column>
          <el-table-column
            prop="realName"
            label="姓名"
            align="center"
            width="80"
            fixed="left"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              <el-link  type="primary" :underline="false"  @click="editPersonInfo(scope.row)">{{scope.row.realName}}</el-link>
            </template>
          </el-table-column>
          <el-table-column
            prop="sex"
            label="性别"
            align="center"
            width="60"
            show-overflow-tooltip
          ></el-table-column>
              <!-- :formatter="sexDictionaries" -->
          <el-table-column
            prop="age"
            label="年龄"
            align="center"
            width="60"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column prop="phone" width="110" label="电话">
            <template slot-scope="scope">{{
              scope.row.phone
                ? scope.row.phone.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3")
                : ""
            }}</template>
          </el-table-column>
          <el-table-column
            prop="idCard"
            label="身份证号"
            width="110"
            show-overflow-tooltip
          >
            <template slot-scope="scope">{{
              scope.row.idCard
                ? scope.row.idCard.replace(/^(\d{4})\d+(\d{4})$/, "$1****$2")
                : ""
            }}</template>
          </el-table-column>
          <el-table-column
            prop="email"
            label="邮箱"
            width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="job"
            label="期望岗位"
            width="170"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="salaryRequirements"
            label="期望薪资"
            width="120"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="workingCity"
            label="工作城市"
            width="150"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="jobSearchingStatus"
            label="求职状态"
            width="150"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
                  {{ $dictUtils.getDictLabel("job_searching_status", scope.row.jobSearchingStatus, '-') }}
            </template>
          </el-table-column>
          <el-table-column
            prop="education"
            label="学历"
            width="120"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
                  {{ $dictUtils.getDictLabel("nature", scope.row.education, '-') }}
            </template>
          </el-table-column>
          <el-table-column
            prop="workingYears"
            label="工作经验年限"
            width="120"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="graduationdate"
            label="毕业时间"
            width="170"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="area"
            label="省市县"
            width="250"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="currentAddress"
            label="现住址"
            width="250"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="loginRoot"
            label="注册来源"
            width="250"
            show-overflow-tooltip
          ></el-table-column>
           <el-table-column
            prop="registerOffice"
            label="来源企业"
            width="250"
            show-overflow-tooltip
          ></el-table-column>
        </el-table>
        <el-pagination
          @size-change="peopleFoundHandleSize"
          @current-change="peopleFoundHandleCurrent"
          :current-page.sync="peopleFoundPageNo"
          :page-size="peopleFoundPageSize"
          layout="total, prev, pager, next, jumper"
          :total="peopleFoundTotal"
          style="margin: 1rem 0"
        >
        </el-pagination>
      </div>
      <el-dialog
            title="详情信息"
            :visible.sync="personInfoDialog"
            width="65%"
          >
            <el-form 
              :model="personInfo"
              size="small"
              ref="personInfo">
              <el-row :gutter="15">
                <el-col :span="6">
                  <el-form-item
                    label="姓名"
                    prop="realName"
                    align="center"
                    label-width="110px">
                    <el-input v-model="personInfo.realName" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="性别"
                    prop="sex"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.sex" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="年龄"
                    prop="age"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.age" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="手机号"
                    prop="phone"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.phone" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="兴趣"
                    prop="interest"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.interest" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="驾照"
                    prop="drivingLicense"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.drivingLicense" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="学历"
                    prop="education"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.education" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col> 
                <el-col :span="6">
                  <el-form-item
                    label="毕业时间"
                    prop="graduationdate"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.graduationdate" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="邮箱"
                    prop="email"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.email" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="身份证号码"
                    prop="idCard"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.idCard" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col> 
                <el-col :span="6">
                  <el-form-item
                    label="户籍"
                    prop="householdRegister"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.householdRegister" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="籍贯"
                    prop="nativeplace"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.nativeplace" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="现住址"
                    prop="currentAddress"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.currentAddress" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>     
                 <el-col :span="6">
                  <el-form-item
                    label="工作经验年限"
                    prop="workingYears"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.workingYears" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="开户行"
                    prop="openingbank"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.openingbank" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="行号"
                    prop="bankcard"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.bankcard" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>        
                 <el-col :span="6">
                  <el-form-item
                    label="求职状态"
                    prop="jobSearchingStatus"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.jobSearchingStatus" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                 <el-col :span="6">
                  <el-form-item
                    label="期望行业"
                    prop="gwname"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.gwname" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="期望工作城市"
                    prop="workingCity"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.workingCity " autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="薪资要求"
                    prop="salaryRequirements"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.salaryRequirements" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="工作企业"
                    prop="sendenterprise.companyName"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.sendenterprise.companyName" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="部门"
                    prop="department.name"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.department.name" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="岗位"
                    prop="job"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.job" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="聘用状态"
                    prop="employmentStatus"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.employmentStatus" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="签订合同企业"
                    prop="enterpriseInformation.companyName"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.enterpriseInformation.companyName" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="注册来源"
                    prop="loginRoot"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.loginRoot" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    label="来源企业"
                    prop="registerOffice"
                    label-width="110px"
                  >
                  <el-input v-model="personInfo.registerOffice" autocomplete="off" readonly></el-input>
                  </el-form-item>
                </el-col>
                
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button
                size="small"
                @click="personInfoDialog = false"
                >关闭</el-button
              >
            </span>
          </el-dialog>
      <!-- 附表选项卡 -->
      <el-tabs
        type="border-card"
        @tab-click="handleClick"
        v-model="attachedListNum"
        style="margin-top: 20px"
      >
        <el-tab-pane label="历史工作记录">
          <!-- 历史工作记录按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="insertUserHirstyWorkDialog = true"
              :disabled="userId == ''"
              >新建
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="delUserHirstyWorks"
              :disabled="checkUserHirstyWorks.length <= 0"
              >删除
            </el-button>
            <el-button size="small" icon="el-icon-circle-close"
              >取消选择
            </el-button>
          </div>
          <!-- 历史工作记录数据表格 -->
          <el-table
            :data="worksExperienceTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="selectUserHirstyWorks"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="UserHirstyWorkLoading"
            row-key="id"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="uname"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
            ></el-table-column>
            <el-table-column
              prop="idCard"
              label="身份证号"
              width="110"
              show-overflow-tooltip
            >
              <template slot-scope="scope">{{
                scope.row.idCard
                  ? scope.row.idCard.replace(/^(\d{4})\d+(\d{4})$/, "$1****$2")
                  : ""
              }}</template>
            </el-table-column>
            <el-table-column
              prop="jobs"
              label="岗位"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="companyName"
              label="单位名称"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="startTime"
              label="工作开始时间"
              show-overflow-tooltip
              min-width="100"
            ></el-table-column>
            <el-table-column
              prop="endTime"
              label="工作结束时间"
              show-overflow-tooltip
              min-width="100"
            ></el-table-column>
            <el-table-column
              prop="isleaveOffice"
              label="是否正常离职"
              min-width="100"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("yes_no", scope.row.isleaveOffice, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              header-align="center"
              align="center"
              :key="Math.random()"
              fixed="right"
              label="操作"
              width="160"
            >
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="updateUserHirstyWorks(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delUserHirstyWorks(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <el-dialog
            title="历史工作记录"
            :visible.sync="insertUserHirstyWorkDialog"
            width="50%"
          >
            <el-form
              :model="insertUserHirstyWorkList"
              size="small"
              ref="insertUserHirstyWorkLists"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    label="开始时间"
                    prop="startTime"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '开始时间不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      style="width: 100%"
                      v-model="insertUserHirstyWorkList.startTime"
                      type="datetime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      placeholder="选择日期时间"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="结束时间"
                    prop="endTime"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '结束时间不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      style="width: 100%"
                      v-model="insertUserHirstyWorkList.endTime"
                      type="datetime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      placeholder="选择日期时间"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="12">
                  <el-form-item
                    label="姓名"
                    prop="uname"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '姓名不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="insertUserHirstyWorkList.uname"
                      placeholder="请填写姓名"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="身份证号"
                    prop="idCard"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '身份证号不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="insertUserHirstyWorkList.idCard"
                      placeholder="请填写身份证号"
                      maxlength="18"
                    ></el-input>
                  </el-form-item>
                </el-col> -->
                <el-col :span="12">
                  <el-form-item
                    label="部门"
                    prop="department"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '部门不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="insertUserHirstyWorkList.department"
                      placeholder="请填写部门"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="岗位"
                    prop="jobs"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '岗位不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="insertUserHirstyWorkList.jobs"
                      placeholder="请填写岗位"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="是否正常离职"
                    prop="isleaveOffice"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '是否正常离职不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="insertUserHirstyWorkList.isleaveOffice"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('yes_no')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="单位名称"
                    prop="companyName"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '单位名称不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="insertUserHirstyWorkList.companyName"
                      placeholder="请填写单位名称"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button
                size="small"
                @click="insertUserHirstyWorkDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="insertUserHirstyWorks"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="体检报告">
          <!-- 体检报告按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              :disabled="userId == ''"
              @click="enterpriseHealthDialog = true"
              >添加</el-button
            >
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="delHealth"
              :disabled="checkMedicalExaminationReports.length <= 0"
              >删除</el-button
            >
            <el-button size="small" icon="el-icon-circle-close"
              >取消选择</el-button
            >
          </div>
          <!-- 体检报告数据表格 -->
          <el-table
            :data="medicalExaminationReportTable"
            height="calc(100% - 80px)"
            size="small"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="enterpriseHealthLoading"
            row-key="id"
            @selection-change="selectenterpriseHealths"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="uname"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
            ></el-table-column>
            <el-table-column
              prop="idcard"
              label="身份证号"
              width="110"
              show-overflow-tooltip
            >
              <template slot-scope="scope">{{
                scope.row.idcard
                  ? scope.row.idcard.replace(/^(\d{4})\d+(\d{4})$/, "$1****$2")
                  : ""
              }}</template>
            </el-table-column>
            <el-table-column
              prop="jobs"
              label="职位名称"
              width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="inspectAddress"
              label="体检地点"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="inspectTime"
              label="体检日期"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="inspectReport"
              label="体检报告"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="company.companyName"
              label="公司名称"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="medicaltype"
              label="体检类型"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("payway", scope.row.medicaltype, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="medicalaccessory"
              label="体检附件"
              show-overflow-tooltip
            >
              <template slot-scope="scope" v-if="scope.row.medicalaccessory">
                <a
                  :href="item"
                  target="_blank"
                  :key="index"
                  v-for="(item, index) in scope.row.medicalaccessory.split('|')"
                >
                  {{
                    decodeURIComponent(
                      item.substring(item.lastIndexOf("/") + 1)
                    )
                  }}
                </a>
              </template>
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="160">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="updateEnterpriseHealths(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delHealth(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 体检分页 -->
          <el-pagination
            @size-change="medicalExaminationReportHandleSize"
            @current-change="medicalExaminationReportHandleCurrent"
            :current-page.sync="medicalExaminationReportPageNo"
            :page-size="medicalExaminationReportPageSize"
            layout="total, prev, pager, next, jumper"
            :total="medicalExaminationReportTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <el-dialog
            title="体检报告"
            :visible.sync="enterpriseHealthDialog"
            width="50%"
          >
            <el-form
              :model="enterpriseHealthList"
              size="small"
              ref="enterpriseHealthLists"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    label="体检报告"
                    prop="inspectReport"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检报告不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="enterpriseHealthList.inspectReport"
                      placeholder="请填写体检报告"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="体检时间"
                    prop="inspectTime"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检时间不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      style="width: 100%"
                      v-model="enterpriseHealthList.inspectTime"
                      type="datetime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      placeholder="选择日期时间"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="体检类型"
                    prop="medicaltype"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检类型不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="enterpriseHealthList.medicaltype"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('medical_type')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="体检地点"
                    prop="inspectAddress"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检地点不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="enterpriseHealthList.inspectAddress"
                      placeholder="请填写体检地点"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="医学诊断结果"
                    prop="medicaldiagnosis"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '医学诊断结果不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="enterpriseHealthList.medicaldiagnosis"
                      placeholder="请填写医学诊断结果"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label=" 体检附件"
                    prop="medicalaccessory"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '体检附件不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <!-- :on-preview="
                        (file, fileList) => {
                          $window.location.href =
                            (file.response && file.response.url) || file.url;
                        }
                      " -->
                    <el-upload
                      ref="logo"
                      :action="`${this.$http.BASE_URL}/dlyrlTest/fileUpload`"
                      :headers="{ token: $cookie.get('token') }"
                      :on-preview="(file) => {$window.open ((file.response && file.response.url) || file.url,'_blank') }"
                      :on-success="
                        (response, file, fileList) => {
                          enterpriseHealthList.medicalaccessory = fileList
                            .map(
                              (item) =>
                                (item.response && item.response.url) || item.url
                            )
                            .join('|');
                        }
                      "
                      :on-remove="
                        (file, fileList) => {
                          $http
                            .post(
                              `/dlyrlTest/deleteFile?path=${
                                (file.response && file.response.url) || file.url
                              }`
                            )
                            .then(({ data }) => {
                              $message.success(data.msg);
                            });
                          enterpriseHealthList.medicalaccessory = fileList
                            .map((item) => item.url)
                            .join('|');
                        }
                      "
                      :before-remove="
                        (file, fileList) => {
                          return $confirm(`确定移除 ${file.name}？`);
                        }
                      "
                      multiple
                      :limit="5"
                      :on-exceed="
                        (files, fileList) => {
                          $message.warning(
                            `当前限制选择 5 个文件，本次选择了 ${
                              files.length
                            } 个文件，共选择了 ${
                              files.length + fileList.length
                            } 个文件`
                          );
                        }
                      "
                      :file-list="enterpriseHealthList.fileList"
                    >
                      <el-button size="small" type="primary"
                        >点击上传</el-button
                      >
                      <div slot="tip" class="el-upload__tip">添加相关附件</div>
                    </el-upload>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="enterpriseHealthDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="saveHealt">确定</el-button>
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="工伤记录">
          <!-- 工伤记录按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              :disabled="userId == ''"
              @click="WorkInjuryDialog = true"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              :disabled="checkinjuryRecords.length <= 0"
              @click="delWorkInjury"
              >删除
            </el-button>
            <el-button size="small" icon="el-icon-circle-close"
              >取消选择
            </el-button>
          </div>
          <!-- 工伤记录数据表格 -->
          <el-table
            :data="injuryRecordTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="selectWorkInjury"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="injuryRecordLoading"
            row-key="id"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="gname"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
            ></el-table-column>
            <el-table-column
              prop="gidcard"
              label="身份证号"
              width="110"
              show-overflow-tooltip
            >
              <template slot-scope="scope">{{
                scope.row.gidcard
                  ? scope.row.gidcard.replace(/^(\d{4})\d+(\d{4})$/, "$1****$2")
                  : ""
              }}</template>
            </el-table-column>
            <el-table-column
              prop="gcompany.companyName"
              label="单位名称"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="createDate"
              label="创建时间"
              width="120"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="time"
              label="发生时间"
              width="120"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="commercialocation"
              label="工伤发生地点"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="businesslevel"
              label="工伤等级"
              width="100"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("business_level", scope.row.businesslevel, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="assignedunit"
              label="合同单位"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="constructionunit"
              label="建设单位"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="conuttionunit"
              label="施工单位"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="laborserviceunit"
              label="劳务单位"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="medicaldiagnosis"
              label="医学诊断附件"
              width="200"
              show-overflow-tooltip
            >
              <template slot-scope="scope" v-if="scope.row.medicaldiagnosis">
                <a
                  :href="item"
                  target="_blank"
                  :key="index"
                  v-for="(item, index) in scope.row.medicaldiagnosis.split('|')"
                >
                  {{
                    decodeURIComponent(
                      item.substring(item.lastIndexOf("/") + 1)
                    )
                  }}
                </a>
              </template>
            </el-table-column>
            <el-table-column
              prop="medicaldiagnosisresult"
              label="医学诊断结果"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column fixed="right" label="操作" width="160">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="updateWorkInjurys(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delWorkInjury(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 工伤分页 -->
          <el-pagination
            @size-change="injuryRecordHandleSize"
            @current-change="injuryRecordHandleCurrent"
            :current-page.sync="injuryRecordPageNo"
            :page-size="injuryRecordPageSize"
            layout="total, prev, pager, next, jumper"
            :total="injuryRecordTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <el-dialog
            title="工伤记录"
            :visible.sync="WorkInjuryDialog"
            width="50%"
          >
            <el-form :model="WorkInjuryList" size="small" ref="WorkInjuryLists">
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    label="发生时间"
                    prop="date"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '发生时间不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      style="width: 100%"
                      v-model="WorkInjuryList.date"
                      type="datetime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      placeholder="选择日期时间"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="工伤发生地点"
                    prop="commercialocation"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '工伤发生地点不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="WorkInjuryList.commercialocation"
                      placeholder="请填工伤发生地点"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="工伤级别"
                    prop="businesslevel"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '工伤级别不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="WorkInjuryList.businesslevel"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('business_level')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="合同单位"
                    prop="assignedunit"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '合同单位不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="WorkInjuryList.assignedunit"
                      placeholder="请填合同单位"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="建设单位"
                    prop="constructionunit"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '建设单位不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="WorkInjuryList.constructionunit"
                      placeholder="请填写建设单位"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="施工单位"
                    prop="conuttionunit"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '施工单位不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="WorkInjuryList.conuttionunit"
                      placeholder="请填写施工单位"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="劳务单位"
                    prop="laborserviceunit"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '劳务单位不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="WorkInjuryList.laborserviceunit"
                      placeholder="请填写劳务单位"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="医学诊断结果"
                    prop="medicaldiagnosisresult"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '医学诊断结果不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="WorkInjuryList.medicaldiagnosisresult"
                      placeholder="请填写医学诊断结果"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="医学诊断附件"
                    prop="medicaldiagnosis"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '医学诊断附件不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-upload
                      ref="logo"
                      :action="`${this.$http.BASE_URL}/dlyrlTest/fileUpload`"
                      :headers="{ token: $cookie.get('token') }"
                      :on-preview="(file) => {$window.open ((file.response && file.response.url) || file.url,'_blank') }"
                      :on-success="
                        (response, file, fileList) => {
                          WorkInjuryList.medicaldiagnosis = fileList
                            .map(
                              (item) =>
                                (item.response && item.response.url) || item.url
                            )
                            .join('|');
                        }
                      "
                      :on-remove="
                        (file, fileList) => {
                          $http
                            .post(
                              `/dlyrlTest/deleteFile?path=${
                                (file.response && file.response.url) || file.url
                              }`
                            )
                            .then(({ data }) => {
                              $message.success(data.msg);
                            });
                          WorkInjuryList.medicaldiagnosis = fileList
                            .map((item) => item.url)
                            .join('|');
                        }
                      "
                      :before-remove="
                        (file, fileList) => {
                          return $confirm(`确定移除 ${file.name}？`);
                        }
                      "
                      multiple
                      :limit="5"
                      :on-exceed="
                        (files, fileList) => {
                          $message.warning(
                            `当前限制选择 5 个文件，本次选择了 ${
                              files.length
                            } 个文件，共选择了 ${
                              files.length + fileList.length
                            } 个文件`
                          );
                        }
                      "
                      :file-list="WorkInjuryList.fileList"
                    >
                      <el-button size="small" type="primary"
                        >点击上传</el-button
                      >
                      <div slot="tip" class="el-upload__tip">添加相关附件</div>
                    </el-upload>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="WorkInjuryDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="saveWorkInjury">确定</el-button>
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="工资表">
          <!-- 工资表按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="addSalaryByUserDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              :disabled="checkSalary.length <= 0"
              @click="delSalarys"
              >删除
            </el-button>
            <el-button
              size="small"
              icon="el-icon-circle-close"
              @click="chooseSalary()"
              >取消选择
            </el-button>
            <el-date-picker
              style="margin-left: 10px"
              v-model="salaryPickerValue"
              format="yyyy-MM"
              value-format="yyyy-MM"
              type="month"
              size="small"
              @change="salaryPicker"
              :clearable="false"
            >
            </el-date-picker>
          </div>
          <!-- 工资表数据表格 -->
          <el-table
            :data="salaryTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="salaryCheckChange"
            ref="salarys"
            :summary-method="getSummaries"
            show-summary
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
              max-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="userSalaryLoading"
            row-key="id"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="salYear"
              label="日期"
              fixed="left"
              align="center"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
                prop="username"
                label="姓名"
                align="center"
                width="80"
                fixed="left"
                show-overflow-tooltip
              ></el-table-column>
            <el-table-column label="基本信息">
              <el-table-column
                prop="department.name"
                label="部门"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="job"
                label="岗位"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <!-- <el-table-column prop="userInformation.bankcard" label="银行卡号" align="center" show-overflow-tooltip></el-table-column> -->
              <el-table-column
                prop="enterpriseInformation.companyName"
                label="服务公司"
                show-overflow-tooltip
              ></el-table-column>
              <!-- <el-table-column prop="idNumber" label="身份证号"></el-table-column> -->
              <!-- <el-table-column prop="phone" label="电话"></el-table-column> -->
            </el-table-column>
            <el-table-column label="考勤 (天)">
              <el-table-column
                prop="shouldAttendanceDay"
                label="应出勤"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="travelDays"
                label="出差"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="leaveDays"
                label="请假"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="realityAttendanceDay"
                label="实际出勤"
                show-overflow-tooltip
                align="center"
              ></el-table-column>
            </el-table-column>
            <el-table-column label="固定工资 (元)">
              <el-table-column
                prop="basePay"
                label="基本工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="postWage"
                label="岗位工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="meritPay"
                label="绩效工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="combinedBasic"
                label="固定合计"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column label="福利待遇 (元)">
              <el-table-column
                prop="seniorityPay"
                label="工龄工资"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="mealAllowance"
                label="餐费补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="trafficAllowance"
                label="交通补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="commission"
                label="业务提成"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="travelAllowance"
                label="出差补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="attendanceBonus"
                label="全勤奖"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="overtime"
                label="加班费"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="communicateSubsidy"
                label="通信补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="otherSupport"
                label="其他补助"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="totalWelfareBenefits"
                label="福利合计"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column
              prop="shouldsalary"
              label="应发工资(元)"
              width="100px"
              align="center"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column label="扣减项目 (元)">
              <el-table-column
                prop="housingProvidentFund"
                label="公积金"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="party"
                label="党费"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="basicOldAgePension"
                label="基本养老"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="basicMedicalCare"
                label="基本医疗"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="unemploymentInsurance"
                label="失业保险"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="individualIncomeTax"
                label="所得税"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="workInjury"
                label="工伤"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="lately"
                label="迟到"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="leaveearly"
                label="早退"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="absenteeism"
                label="旷工"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="otherDeductions"
                label="其他扣款"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="deductionsCombined"
                label="扣减合计"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column label="企业保险 (元)">
              <el-table-column
                prop="providentFund"
                label="企业公积金"
                width="100px"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="pension"
                label="企业养老"
                align="center"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="medical"
                label="企业医疗"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="unemployment"
                label="企业失业"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="businessInjury"
                label="企业工伤"
                align="center"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="otherFee"
                label="企业其他费用"
                align="center"
                width="110px"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="totalFees"
                label="企业费用合计"
                align="center"
                width="110px"
                show-overflow-tooltip
              ></el-table-column>
            </el-table-column>
            <el-table-column
              prop="netPayroll"
              label="实发工资(元)"
              width="100px"
              align="center"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              fixed="right"
              label="操作"
              width="160"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="updateSalarys(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delSalarys(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 工资表分页 -->
          <el-pagination
            @size-change="salaryHandleSize"
            @current-change="salaryHandleCurrent"
            :current-page.sync="salaryPageNo"
            :page-size="salaryPageSize"
            layout="total, prev, pager, next, jumper"
            :total="salaryTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <el-dialog
            title="薪资信息"
            :visible.sync="addSalaryByUserDialog"
            width="75%"
          >
            <el-form
              ref="addSalaryByUser"
              :model="addSalaryByUser"
              :rules="rule"
            >
              <el-row style="margin-bottom: 10px">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>基本信息：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="salYear"
                    label="日期："
                    :label-width="formLabelWidth"
                  >
                    <el-date-picker
                      v-model="addSalaryByUser.salYear"
                      format="yyyy-MM"
                      value-format="yyyy-MM"
                      type="month"
                      placeholder="选择日期"
                      style="width: 100%"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="username"
                    label="姓名："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.username"
                      autocomplete="off"
                      placeholder="姓名"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="phone"
                    label="电话："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.phone"
                      maxlength="11"
                      placeholder="电话"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="idNumber"
                    label="身份证号："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.idNumber"
                      maxlength="18"
                      placeholder="身份证"
                      autocomplete="off"
                      disabled
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="6">
                  <!-- <el-form-item size="small" prop="department" label="部门：" :label-width="formLabelWidth">
						<el-input v-model="addSalaryByUser.department" autocomplete="off" v-on:click.native="Select_Peo" placeholder="请选择部门"></el-input>
					</el-form-item> -->
                  <el-form-item
                    size="small"
                    prop="department"
                    label="部门："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.department"
                      autocomplete="off"
                      placeholder="部门"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="job"
                    label="岗位："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.job"
                      autocomplete="off"
                      placeholder="岗位"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="bankcard"
                    label="银行卡号："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.bankcard"
                      maxlength="18"
                      placeholder="银行卡号"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="banknumber"
                    label="银行行号："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.banknumber"
                      placeholder="银行行号"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="openingbank"
                    label="银行开户行："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.openingbank"
                      placeholder="银行开户行"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>考勤 (天)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="shouldAttendanceDay"
                    label="应出勤："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.shouldAttendanceDay"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="travelDays"
                    label="出差："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.travelDays"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="leaveDays"
                    label="请假："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.leaveDays"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="realityAttendanceDay"
                    label="实际出勤："
                    :label-width="formLabelWidth"
                  >
                    <span
                      >{{
                        Number(
                          this.addSalaryByUser.shouldAttendanceDay -
                            this.addSalaryByUser.travelDays -
                            this.addSalaryByUser.leaveDays
                        )
                      }}
                      (天)</span
                    >
                    <!-- <el-input autocomplete="off" :disabled="true">{{Number(this.addSalaryByUser.shouldAttendanceDay-this.addSalaryByUser.travelDays-this.addSalaryByUser.leaveDays)}}</el-input> -->
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>固定工资 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="basePay"
                    label="基本工资："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.basePay"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="postWage"
                    label="岗位工资："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.postWage"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="meritPay"
                    label="绩效工资："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.meritPay"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="combinedBasic"
                    label="固定合计："
                    :label-width="formLabelWidth"
                  >
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basePay) +
                        Number(this.addSalaryByUser.postWage) +
                        Number(this.addSalaryByUser.meritPay)
                      }}</span
                    >
                    <!-- <el-input v-model="addSalaryByUser.combinedBasic" autocomplete="off" :disabled="true"></el-input> -->
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>福利待遇 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="seniorityPay"
                    label="工龄工资："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.seniorityPay"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="mealAllowance"
                    label="餐费补助："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.mealAllowance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="trafficAllowance"
                    label="交通补助："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.trafficAllowance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="commission"
                    label="业务提成："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.commission"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="travelAllowance"
                    label="出差补助："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.travelAllowance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="attendanceBonus"
                    label="全勤奖："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.attendanceBonus"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="overtime"
                    label="加班费："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.overtime"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="communicateSubsidy"
                    label="通信补助："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.communicateSubsidy"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="otherSupport"
                    label="其他补助："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.otherSupport"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="totalWelfareBenefits"
                    label="福利合计："
                    :label-width="formLabelWidth"
                  >
                    <!-- <el-input v-model="addSalaryByUser.totalWelfareBenefits" autocomplete="off" :disabled="true"></el-input> -->
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.seniorityPay) +
                        Number(this.addSalaryByUser.mealAllowance) +
                        Number(this.addSalaryByUser.trafficAllowance) +
                        Number(this.addSalaryByUser.commission) +
                        Number(this.addSalaryByUser.travelAllowance) +
                        Number(this.addSalaryByUser.attendanceBonus) +
                        Number(this.addSalaryByUser.overtime) +
                        Number(this.addSalaryByUser.communicateSubsidy) +
                        Number(this.addSalaryByUser.otherSupport)
                      }}</span
                    >
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>扣减合计 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="basicOldAgePension"
                    label="基本养老："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.basicOldAgePension"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="basicMedicalCare"
                    label="基本医疗："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.basicMedicalCare"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="unemploymentInsurance"
                    label="失业保险："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.unemploymentInsurance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="housingProvidentFund"
                    label="公积金："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.housingProvidentFund"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="individualIncomeTax"
                    label="所得税："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.individualIncomeTax"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="party"
                    label="党费："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.party"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="workInjury"
                    label="工伤："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.workInjury"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="lately"
                    label="迟到："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.lately"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="leaveearly"
                    label="早退："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.leaveearly"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="absenteeism"
                    label="旷工："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.absenteeism"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="otherDeductions"
                    label="其他扣款："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.otherDeductions"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="deductionsCombined"
                    label="扣减合计："
                    :label-width="formLabelWidth"
                  >
                    <!-- <el-input v-model="addSalaryByUser.deductionsCombined" autocomplete="off" :disabled="true"></el-input> -->
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basicOldAgePension) +
                        Number(this.addSalaryByUser.basicMedicalCare) +
                        Number(this.addSalaryByUser.unemploymentInsurance) +
                        Number(this.addSalaryByUser.housingProvidentFund) +
                        Number(this.addSalaryByUser.individualIncomeTax) +
                        Number(this.addSalaryByUser.lately) +
                        Number(this.addSalaryByUser.leaveearly) +
                        Number(this.addSalaryByUser.absenteeism) +
                        Number(this.addSalaryByUser.otherDeductions) +
                        Number(this.addSalaryByUser.party) +
                        Number(this.addSalaryByUser.workInjury)
                      }}</span
                    >
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin: 10px 0">
                <el-col
                  ><span
                    style="font-size: 14px; font-weight: 550; color: #2a8bd8"
                    ><i class="el-icon-menu"></i>企业保险 (元)：</span
                  ></el-col
                >
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="providentFund"
                    label="企业公积金："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.providentFund"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="pension"
                    label="企业养老："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.pension"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="medical"
                    label="企业医疗："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.medical"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="unemployment"
                    label="企业失业："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.unemployment"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="businessInjury"
                    label="企业工伤："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.businessInjury"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="otherFee"
                    label="企业其他费用："
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="addSalaryByUser.otherFee"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row type="flex">
                <el-col :span="4">
                  <el-form-item
                    size="small"
                    prop="totalFees"
                    label="企业费用合计："
                    :label-width="formLabelWidth"
                  >
                    <!-- <el-input v-model="addSalaryByUser.totalFees" autocomplete="off" :disabled="true"></el-input> -->
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.providentFund) +
                        Number(this.addSalaryByUser.pension) +
                        Number(this.addSalaryByUser.medical) +
                        Number(this.addSalaryByUser.unemployment) +
                        Number(this.addSalaryByUser.businessInjury) +
                        Number(this.addSalaryByUser.otherFee)
                      }}
                    </span>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row style="margin-top: 16px; font-weight: 550">
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="shouldsalary"
                    label="应发工资："
                    :label-width="formLabelWidth"
                  >
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basePay) +
                        Number(this.addSalaryByUser.postWage) +
                        Number(this.addSalaryByUser.meritPay) +
                        (Number(this.addSalaryByUser.seniorityPay) +
                          Number(this.addSalaryByUser.mealAllowance) +
                          Number(this.addSalaryByUser.trafficAllowance) +
                          Number(this.addSalaryByUser.commission) +
                          Number(this.addSalaryByUser.travelAllowance) +
                          Number(this.addSalaryByUser.attendanceBonus) +
                          Number(this.addSalaryByUser.overtime) +
                          Number(this.addSalaryByUser.communicateSubsidy) +
                          Number(this.addSalaryByUser.otherSupport))
                      }}</span
                    >
                    <!-- <el-input v-model="addSalaryByUser.shouldsalary" autocomplete="off" :disabled="true"></el-input> -->
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item
                    size="small"
                    prop="netPayroll"
                    label="实发工资："
                    :label-width="formLabelWidth"
                  >
                    <span
                      >￥{{
                        Number(this.addSalaryByUser.basePay) +
                        Number(this.addSalaryByUser.postWage) +
                        Number(this.addSalaryByUser.meritPay) +
                        (Number(this.addSalaryByUser.seniorityPay) +
                          Number(this.addSalaryByUser.mealAllowance) +
                          Number(this.addSalaryByUser.trafficAllowance) +
                          Number(this.addSalaryByUser.commission) +
                          Number(this.addSalaryByUser.travelAllowance) +
                          Number(this.addSalaryByUser.attendanceBonus) +
                          Number(this.addSalaryByUser.overtime) +
                          Number(this.addSalaryByUser.communicateSubsidy) +
                          Number(this.addSalaryByUser.otherSupport)) -
                        (Number(this.addSalaryByUser.basicOldAgePension) +
                          Number(this.addSalaryByUser.basicMedicalCare) +
                          Number(this.addSalaryByUser.unemploymentInsurance) +
                          Number(this.addSalaryByUser.housingProvidentFund) +
                          Number(this.addSalaryByUser.individualIncomeTax) +
                          Number(this.addSalaryByUser.lately) +
                          Number(this.addSalaryByUser.leaveearly) +
                          Number(this.addSalaryByUser.absenteeism) +
                          Number(this.addSalaryByUser.otherDeductions) +
                          Number(this.addSalaryByUser.party) +
                          Number(this.addSalaryByUser.workInjury))
                      }}</span
                    >
                    <!-- <el-input v-model="addSalaryByUser.netPayroll" autocomplete="off" :disabled="true"></el-input> -->
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <div slot="footer" class="dialog-footer">
              <el-button size="small" @click="addSalaryByUserDialog = false"
                >取 消</el-button
              >
              <el-button size="small" type="primary" @click="addSalarys"
                >确 定</el-button
              >
            </div>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="公积金">
          <!-- 公积金按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="accumulationFundDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button size="small" icon="el-icon-circle-close"
              >取消选择
            </el-button>
            <el-date-picker
              style="margin-left: 10px"
              v-model="accumulationFundPickerValue"
              format="yyyy-MM"
              value-format="yyyy-MM"
              type="month"
              size="small"
              @change="accumulationFundPicker"
              :clearable="false"
            >
            </el-date-picker>
          </div>
          <!-- 公积金数据表格 -->
          <el-table
            :data="accumulationFundTable"
            height="calc(100% - 80px)"
            size="small"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="accumulationLoading"
            row-key="id"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="userinformation.realName"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
            ></el-table-column>
            <el-table-column
              prop="paytime"
              label="缴费日期"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="accountStatus"
              label="账户状态"
              width="220"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("account_status", scope.row.accountStatus, '-') }}
              </template>
            </el-table-column>
            <el-table-column prop="phone" width="110" label="电话">
              <template slot-scope="scope">{{
                scope.row.phone
                  ? scope.row.phone.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3")
                  : ""
              }}</template>
            </el-table-column>
            <el-table-column
              prop="companyName.companyName"
              label="单位名称"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="depositBase"
              label="缴存基数"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="companyDepositRatio"
              label="单位缴存比例"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="companyMonthlyDeposit"
              label="单位月缴存额"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="personalDepositRatio"
              label="个人缴存比例"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="personalMonthlyDeposit"
              label="个人月缴存额"
              width="200"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="accountBalance"
              label="账户余额"
              width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column fixed="right" label="操作" width="160">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="EditaccumulationFund(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delaccumulationFund(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 公积金分页 -->
          <el-pagination
            @size-change="accumulationFundHandleSize"
            @current-change="accumulationFundHandleCurrent"
            :current-page.sync="accumulationFundPageNo"
            :page-size="accumulationFundPageSize"
            layout="total, prev, pager, next, jumper"
            :total="accumulationFundTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <el-dialog
            title="公积金"
            :visible.sync="accumulationFundDialog"
            width="50%"
          >
            <el-form
              :model="accumulationFundList"
              size="small"
              ref="accumulationFundList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    label="缴费日期"
                    prop="paytime"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴费日期',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="accumulationFundList.paytime"
                      type="datetime"
                      format="yyyy-MM-dd  hh:mm:ss"
                      value-format="yyyy-MM-dd  hh:mm:ss"
                      placeholder="选择日期"
                      style="width: 100%"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="accountStatus"
                    label="账户状态"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入账户状态',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="accumulationFundList.accountStatus"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('account_status')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="accountBalance"
                    label="账户余额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入账户余额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.accountBalance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="depositBase"
                    label="缴存基数"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴存基数',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.depositBase"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="companyDepositRatio"
                    label="单位缴存比例"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入单位缴存比例',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.companyDepositRatio"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="companyMonthlyDeposit"
                    label="单位月缴存额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入单位月缴存额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.companyMonthlyDeposit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="personalDepositRatio"
                    label="个人缴存比例"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入个人缴存比例',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.personalDepositRatio"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="personalMonthlyDeposit"
                    label="个人月缴存额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入个人月缴存额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundList.personalMonthlyDeposit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="accumulationFundDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="accumulationFundHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
          <!-- 编辑公积金 -->
          <el-dialog
            title="编辑公积金"
            :visible.sync="accumulationEditDialog"
            width="50%"
          >
            <el-form
              :model="accumulationFundEdit"
              size="small"
              ref="accumulationFundEdit"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    label="缴费日期"
                    prop="paytime"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴费日期',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="accumulationFundEdit.paytime"
                      type="datetime"
                      format="yyyy-MM-dd  hh:mm:ss"
                      value-format="yyyy-MM-dd  hh:mm:ss"
                      placeholder="选择日期"
                      style="width: 100%"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="accountStatus"
                    label="账户状态"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入账户状态',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-select
                      v-model="accumulationFundEdit.accountStatus"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('account_status')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="accountBalance"
                    label="账户余额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入账户余额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundEdit.accountBalance"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="depositBase"
                    label="缴存基数"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴存基数',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundEdit.depositBase"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="companyDepositRatio"
                    label="单位缴存比例"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入单位缴存比例',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundEdit.companyDepositRatio"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="companyMonthlyDeposit"
                    label="单位月缴存额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入单位月缴存额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundEdit.companyMonthlyDeposit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="personalDepositRatio"
                    label="个人缴存比例"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入个人缴存比例',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundEdit.personalDepositRatio"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    size="small"
                    prop="personalMonthlyDeposit"
                    label="个人月缴存额"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入个人月缴存额(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="accumulationFundEdit.personalMonthlyDeposit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="accumulationEditDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="accumulationEditHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="社保">
          <!-- 社保按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="socialSecurityDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              @click="delSocialSecuritys"
              :disabled="checkSocialSecuritys.length <= 0"
              >删除
            </el-button>
            <el-button size="small" icon="el-icon-circle-close"
              >取消选择
            </el-button>
            <el-date-picker
              style="margin-left: 10px"
              v-model="socialSecurityPickerValue"
              format="yyyy-MM"
              value-format="yyyy-MM"
              type="month"
              size="small"
              @change="asocialSecurityPicker"
              :clearable="false"
            >
            </el-date-picker>
          </div>
          <!-- 社保数据表格 -->
          <el-table
            :data="socialSecurityTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="socialSecuritys"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="socialSecurityloading"
            row-key="id"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="userinformation.realName"
              label="姓名"
              fixed="left"
              width="80"
              align="center"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="company.companyName"
              label="单位名称"
              width="220"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="paytime"
              label="缴费日期"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="pension"
              label="养老保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="medicalCare"
              label="医疗保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="unemployment"
              label="失业保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="birth"
              label="生育保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="workHurt"
              label="工伤保险"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column fixed="right" label="操作" width="160">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="redactSocialSecurity(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delSocialSecurity(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <!-- 社保分页 -->
          <el-pagination
            @size-change="socialSecurityHandleSize"
            @current-change="socialSecurityHandleCurrent"
            :current-page.sync="socialSecurityPageNo"
            :page-size="socialSecurityPageSize"
            layout="total, prev, pager, next, jumper"
            :total="socialSecurityTotal"
            style="margin: 1rem 0"
          >
          </el-pagination>
          <!-- 社保新增 -->
          <el-dialog
            title="社保"
            :visible.sync="socialSecurityDialog"
            width="50%"
          >
            <el-form
              :model="socialSecurityList"
              size="small"
              ref="socialSecurityList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    prop="paytime"
                    size="small"
                    label="缴费日期"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴费日期',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="socialSecurityList.paytime"
                      format="yyyy-MM"
                      value-format="yyyy-MM"
                      type="month"
                      placeholder="选择月"
                      style="width: 100%"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="pension"
                    size="small"
                    label="养老保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入养老保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.pension"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="medicalCare"
                    size="small"
                    label="医疗保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入医疗保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.medicalCare"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="unemployment"
                    size="small"
                    label="失业保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入失业保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.unemployment"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="birth"
                    size="small"
                    label="生育保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入生育保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.birth"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="workHurt"
                    size="small"
                    label="工伤保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入工伤保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="socialSecurityList.workHurt"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="socialSecurityDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="socialSecurityHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
          <!-- 社保编辑 -->
          <el-dialog
            title="社保"
            :visible.sync="editSocialSecurityDialog"
            width="50%"
          >
            <el-form
              :model="editSocialSecurityList"
              size="small"
              ref="editSocialSecurityList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    prop="paytime"
                    size="small"
                    label="缴费日期"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入缴费日期',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="editSocialSecurityList.paytime"
                      format="yyyy-MM"
                      value-format="yyyy-MM"
                      type="month"
                      placeholder="选择月"
                      style="width: 100%"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="pension"
                    size="small"
                    label="养老保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入养老保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="editSocialSecurityList.pension"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="medicalCare"
                    size="small"
                    label="医疗保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入医疗保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="editSocialSecurityList.medicalCare"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="unemployment"
                    size="small"
                    label="失业保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入失业保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="editSocialSecurityList.unemployment"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="birth"
                    size="small"
                    label="生育保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入生育保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="editSocialSecurityList.birth"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="workHurt"
                    size="small"
                    label="工伤保险"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入工伤保险(最多保留两位小数)',
                        trigger: 'blur',
                        pattern: /^\d*\.?(\d|\d{2})$/,
                      },
                    ]"
                  >
                    <el-input
                      v-model="editSocialSecurityList.workHurt"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="editSocialSecurityDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="confirmRedactSocialSecuritys"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
        <el-tab-pane label="简历">
          <!-- 简历按钮 -->
          <!-- <div>
                        <el-button size="small" icon="el-icon-circle-close">取消选择
                        </el-button>
                    </div> -->
          <!-- 简历数据表格 -->
          <el-table
            :data="resumeTable"
            height="calc(100% - 80px)"
            size="small"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 10px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="resumeLoading"
            row-key="id"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="userInformation.realName"
              label="姓名"
              align="center"
              fixed="left"
              width="80"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="userInformation.sex"
              label="性别"
              width="60"
              align="center"
              show-overflow-tooltip
            >
              <!-- <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("sex", scope.row.userInformation.sex, '-') }}
              </template> -->
            </el-table-column>
            <el-table-column
              prop="userInformation.age"
              label="年龄"
              align="center"
              width="60"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="userInformation.email"
              label="邮箱"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="workingYears"
              label="工作经验年限"
              min-width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="graduationdate"
              label="毕业年限"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="workingCity"
              label="期望工作城市"
              min-width="100"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="userInformation.currentAddress"
              label="现住址"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="salaryRequirements"
              label="薪资要求"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="jobSearchingStatus"
              label="求职状态"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("job_searching_status", scope.row.jobSearchingStatus, '-') }}
              </template>
            </el-table-column>
            <el-table-column
              prop="jobPosts"
              label="期望岗位"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="careerObjective"
              label="求职意向"
              show-overflow-tooltip
            ></el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane label="合同">
          <!-- 合同数据表格 -->
          <el-table
            :data="contractTable"
            height="calc(100% - 80px)"
            size="small"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 10px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="contractLoading"
            row-key="id"
          >
            <el-table-column
              prop="name"
              fixed="left"
              label="姓名"
              align="center"
              width="80"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column prop="phone" width="110" label="电话">
              <template slot-scope="scope">{{
                scope.row.phone
                  ? scope.row.phone.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3")
                  : ""
              }}</template>
            </el-table-column>
            <el-table-column
              prop="idCard"
              label="身份证号"
              width="110"
              show-overflow-tooltip
            >
              <template slot-scope="scope">{{
                scope.row.idCard
                  ? scope.row.idCard.replace(/^(\d{4})\d+(\d{4})$/, "$1****$2")
                  : ""
              }}</template>
            </el-table-column>
            <el-table-column
              prop="probationPeriod"
              label="试用期时间"
              min-width="120"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="probationSalary"
              label="试用期薪资"
              min-width="120"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="beginTime"
              label="开始时间"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="endTime"
              label="到期时间"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="userIsSure"
              label="人员是否确认"
              min-width="120"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                    {{ $dictUtils.getDictLabel("usersure", scope.row.userIsSure, '-') }}
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane label="信用记录">
          <!-- 信用记录按钮 -->
          <div>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-circle-plus-outline"
              @click="creditRecordDialog = true"
              :disabled="userId == ''"
              >添加
            </el-button>
            <el-button
              type="danger"
              size="small"
              icon="el-icon-delete"
              :disabled="checkCreditRecord.length <= 0"
              @click="delCreditRecords"
              >删除
            </el-button>
            <el-button size="small" icon="el-icon-circle-close"
              >取消选择
            </el-button>
          </div>
          <!-- 信用记录数据表格 -->
          <el-table
            :data="creditRecordTable"
            height="calc(100% - 80px)"
            size="small"
            @selection-change="creditRecordChange"
            :cell-style="cellStyle"
            style="
              border: 1px solid #d6cfe2;
              margin-top: 20px;
              min-height: 380px;
            "
            :header-cell-class-name="cellHeadStyle"
            :row-class-name="tableRowClassName"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            v-loading="creditRecordLoading"
            row-key="id"
          >
            <el-table-column type="selection" width="55" align="center"></el-table-column>
            <el-table-column
              prop="userinfo.realName"
              label="姓名"
              align="center"
              width="80"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="idCard"
              label="身份证号"
              width="110"
              show-overflow-tooltip
            >
              <template slot-scope="scope">{{
                scope.row.idCard
                  ? scope.row.idCard.replace(/^(\d{4})\d+(\d{4})$/, "$1****$2")
                  : ""
              }}</template>
            </el-table-column>
            <el-table-column
              prop="job"
              label="岗位"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="enterpriseinfo.companyName"
              label="单位名称"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="time"
              label="记录时间"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="record"
              label="信用记录"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column fixed="right" label="操作" width="160">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  icon="el-icon-edit"
                  size="mini"
                  @click="editCreditRecord(scope.row)"
                  >修改</el-button
                >
                <el-button
                  type="text"
                  icon="el-icon-delete"
                  size="mini"
                  @click="delCreditRecord(scope.row.id)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <el-dialog
            title="信用记录"
            :visible.sync="creditRecordDialog"
            width="50%"
          >
            <el-form
              :model="creditRecordList"
              size="small"
              ref="creditRecordList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    prop="time"
                    size="small"
                    label="记录时间"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入记录时间',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="creditRecordList.time"
                      format="yyyy-MM-dd"
                      value-format="yyyy-MM-dd"
                      type="date"
                      placeholder="选择时间"
                      style="width: 100%"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="record"
                    size="small"
                    label="信用记录"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入信用记录',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="creditRecordList.record"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="creditRecordDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="creditRecordHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
          <el-dialog
            title="编辑信用记录"
            :visible.sync="editCreditRecordDialog"
            width="50%"
          >
            <el-form
              :model="editCreditRecordList"
              size="small"
              ref="editCreditRecordList"
            >
              <el-row :gutter="15">
                <el-col :span="12">
                  <el-form-item
                    prop="time"
                    size="small"
                    label="记录时间"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入记录时间',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-date-picker
                      v-model="editCreditRecordList.time"
                      format="yyyy-MM-dd"
                      value-format="yyyy-MM-dd"
                      type="date"
                      placeholder="选择时间"
                      style="width: 100%"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    prop="record"
                    size="small"
                    label="信用记录"
                    label-width="110px"
                    :rules="[
                      {
                        required: true,
                        message: '请输入信用记录',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      v-model="editCreditRecordList.record"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
              <el-button size="small" @click="editCreditRecordDialog = false"
                >关闭</el-button
              >
              <el-button size="small" @click="editCreditRecordHealt"
                >确定</el-button
              >
            </span>
          </el-dialog>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>
<script>
import tableStyles from "../../../../../utils/mixins.js";
var bankAccountValid = (rule, value, callback) => {
  const strBin =
    "10,18,30,35,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,62,65,68,69,84,87,88,94,95,98,99";
  if (!value) {
    return callback(new Error("收款账户不能为空"));
  } else if (!Number.isInteger(+value)) {
    callback(new Error("银行卡号必须全为数字"));
  } else if (value.trim().length < 12 || value.trim().length > 19) {
    callback(new Error("银行卡号长度必须在12到19之间"));
  } else if (strBin.indexOf(value.substring(0, 2)) === -1) {
    callback(new Error("银行卡号开头6位不符合规范"));
  } else {
    callback();
  }
};
export default {
  mixins: [tableStyles],
  data() {
    return {
      personInfoDialog:false,//点击姓名详情弹出层
      personInfo:{
        enterpriseInformation:{
          companyName:'',
        },
        sendenterprise:{
          companyName:'',
        },
        department:{
          name:''
        }
      },//详情对象
      valueData: [], //保存省市县的数组
      formLabelWidth: "110px",
      attachedListNum: "0", //附表选项卡绑定的值
      userId: "", //人员id

      peopleFoundSearch: {
        // 搜索表单对象
        sex: "",
        realName: "",
        phone: "",
        currentAddress: "",
      },
      peopleFoundLoading: "",
      peopleFoundTable: [], //人才数据数组,分页,总条数
      peopleFoundPageNo: 1,
      peopleFoundPageSize: 10,
      peopleFoundTotal: 0,

      UserHirstyWorkLoading: "",
      worksExperienceTable: [], //历史工作记录数据数组
      checkUserHirstyWorks: [], //选中历史工作记录（删除）
      insertUserHirstyWorkDialog: false, //新增历史工作记录
      insertUserHirstyWorkList: {
        id: "",
        startTime: "", // 工作开始时间
        endTime: "", // 工作结束时间
        isleaveOffice: "", // 是否正常离职(0是，1否)
        uname: "", // 姓名
        idCard: "", // 身份证号

        jobs: "", // 岗位
        companyName: "", // 单位名称
        userinformation: "", // 用户
        department: "", // 部门
      },

      enterpriseHealthLoading: "",
      medicalExaminationReportTable: [], //体检报告数据数组
      checkMedicalExaminationReports: [], //选中体检报告记录（删除）
      medicalExaminationReportPageNo: 1, //体检分页，总条数
      medicalExaminationReportPageSize: 1,
      medicalExaminationReportTotal: 0,
      enterpriseHealthDialog: false,
      enterpriseHealthList: {
        id: "", // id
        inspectAddress: "", // 体检地点
        inspectTime: "", // 体检日期
        inspectReport: "", // 体检报告
        medicaldiagnosis: "", // 医学诊断结果
        medicalaccessoryName: "", // 体检附件名称
        medicalaccessory: "", // 体检附件
        medicaltype: "", // 体检类型(0入职体检 1常规体检)
        fileList: [],
      },

      injuryRecordLoading: "",
      injuryRecordTable: [], //工伤记录数据数组
      checkinjuryRecords: [], //选中工伤记录（删除）
      injuryRecordPageNo: 1, //工伤分页，总条数
      injuryRecordPageSize: 10,
      injuryRecordTotal: 0,
      WorkInjuryDialog: false,
      WorkInjuryList: {
        id: "",
        date: "",
        commercialocation: "",
        businesslevel: "",
        assignedunit: "",
        constructionunit: "",
        conuttionunit: "",
        laborserviceunit: "",
        medicaldiagnosis: "",
        medicaldiagnosisresult: "",
        fileList: [],
      },

      userSalaryLoading: "",
      salaryTable: [], //工资表数据数组
      salaryPageNo: 1, //工资表分页，总条数
      salaryPageSize: 10,
      salaryTotal: 0,
      salaryPickerValue: "", //工资表日期
      addSalaryByUserDialog: false,
      addSalaryByUser: {
        id: "",
        userInformation: "",
        salYear: "",
        username: "",
        department: "",
        departmentName: "",
        job: "",
        enterpriseInformation: "",
        idNumber: "",
        phone: "",
        shouldAttendanceDay: "",
        travelDays: "",
        leaveDays: "",
        realityAttendanceDay: "",
        basePay: "",
        postWage: "",
        meritPay: "",
        combinedBasic: "",
        seniorityPay: "",
        mealAllowance: "",
        trafficAllowance: "",
        commission: "",
        travelAllowance: "",
        attendanceBonus: "",
        overtime: "",
        communicateSubsidy: "",
        otherSupport: "",
        totalWelfareBenefits: "",
        shouldsalary: "",
        basicOldAgePension: "",
        basicMedicalCare: "",
        unemploymentInsurance: "",
        housingProvidentFund: "",
        individualIncomeTax: "",
        lately: "",
        leaveearly: "",
        absenteeism: "",
        otherDeductions: "",
        deductionsCombined: "",
        netPayroll: "",
        bankcard: "",
        openingbank: "",
        banknumber: "",
        party: "", //党费
        workInjury: "", //工伤扣款
        providentFund: "", //企业公积金
        pension: "", //企业养老
        medical: "", //企业医疗
        unemployment: "", //企业失业
        businessInjury: "", //企业工伤
        otherFee: "", //企业其他费用
        totalFees: "", //企业费用合计
        file: "",
      },
      rule: {
        salYear: { required: true, message: "请选择日期", trigger: "blur" },
        username: { required: true, message: "请选择姓名" },
        // department:{required: true, message: '请选择部门', },
        // job:{required: true, message: '请输入岗位', trigger: 'blur'},
        idNumber: [
          { required: true, message: "请输入身份证号", trigger: "blur" },
          { min: 15, max: 18, message: "请输入正确的身份证", trigger: "blur" },
          {
            required: true,
            pattern:
              /^[1-9][0-9]{5}(18|19|20)[0-9]{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)[0-9]{3}([0-9]|(X|x))/,
            message: "请输入正确的身份证",
            trigger: "blur",
          },
        ],
        phone: [
          { required: true, message: "请输入电话", trigger: "blur" },
          { min: 11, max: 11, message: "请输入正确的电话", trigger: "blur" },
          {
            required: true,
            pattern: /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/,
            message: "请输入正确的电话",
            trigger: "blur",
          },
        ],
        bankcard: {
          required: true,
          trigger: "blur",
          validator: bankAccountValid,
        },
        openingbank: {
          required: true,
          message: "请输入银行开户行",
          trigger: "blur",
        },
        shouldAttendanceDay: {
          required: true,
          message: "请输入应出勤",
          trigger: "blur",
        },
        travelDays: { required: true, message: "请输入出差", trigger: "blur" },
        leaveDays: { required: true, message: "请输入请假", trigger: "blur" },
        // realityAttendanceDay:[
        // 	{required: true, message: '请输入实际出勤', trigger: 'blur'},
        // 	{validator: realityAttendanceDays, trigger: 'blur' }
        // ],
        basePay: { required: true, message: "请输入基本工资", trigger: "blur" },
        postWage: {
          required: true,
          message: "请输入岗位工资",
          trigger: "blur",
        },
        meritPay: {
          required: true,
          message: "请输入绩效工资",
          trigger: "blur",
        },
        // combinedBasic:[
        // 	{required: true, message: '请输入基本合计', trigger: 'blur'},
        // 	{validator: combinedBasics, trigger: 'blur' }
        // ],
        // seniorityPay:{required: true, message: '请输入工龄工资', trigger: 'blur'},
        // mealAllowance:{required: true, message: '请输入餐费补助', trigger: 'blur'},
        // trafficAllowance:{required: true, message: '请输入交通补助', trigger: 'blur'},
        // commission:{required: true, message: '请输入业务提成', trigger: 'blur'},
        // travelAllowance:{required: true, message: '请输入出差补助', trigger: 'blur'},
        // attendanceBonus:{required: true, message: '请输入全勤奖', trigger: 'blur'},
        // overtime:{required: true, message: '请输入加班费', trigger: 'blur'},
        // communicateSubsidy:{required: true, message: '请输入通信补助', trigger: 'blur'},
        // otherSupport:{required: true, message: '请输入其他补助', trigger: 'blur'},
        // totalWelfareBenefits:[
        // 	{required: true, message: '请输入福利合计', trigger: 'blur'},
        // 	{validator: totalWelfareBenefitss, trigger: 'blur' }
        // ],
        // shouldsalary:[
        // 	{required: true, message: '请输入应发工资', trigger: 'blur'},
        // 	{validator: shouldsalarys, trigger: 'blur' }
        // ],
        // basicOldAgePension:{required: true, message: '请输入基本养老', trigger: 'blur'},
        // basicMedicalCare:{required: true, message: '请输入基本医疗', trigger: 'blur'},
        // unemploymentInsurance:{required: true, message: '请输入失业保险', trigger: 'blur'},
        // housingProvidentFund:{required: true, message: '请输入公积金', trigger: 'blur'},
        // individualIncomeTax:{required: true, message: '请输入所得税', trigger: 'blur'},
        // lately:{required: true, message: '请输入迟到', trigger: 'blur'},
        // leaveearly:{required: true, message: '请输入早退', trigger: 'blur'},
        // absenteeism:{required: true, message: '请输入旷工', trigger: 'blur'},
        // otherDeductions:{required: true, message: '请输入其他扣款', trigger: 'blur'},
        // deductionsCombined:[
        // 	{required: true, message: '请输入扣减合计', trigger: 'blur'},
        // 	{validator: deductionsCombineds, trigger: 'blur' }
        // ],
        // netPayroll:[
        // 	{required: true, message: '请输入实发工资', trigger: 'blur'},
        // 	{validator: netPayrolls, trigger: 'blur' }
        // ],
      },
      checkSalary: [], //工资选中行

      accumulationLoading: "",
      accumulationFundTable: [], //公积金数据数组
      accumulationFundPageNo: 1, //公积金分页，总条数
      accumulationFundPageSize: 10,
      accumulationFundTotal: 0,
      accumulationFundPickerValue: "", //公积金日期
      accumulationFundDialog: false,
      accumulationFundList: {
        paytime: "",
        accountStatus: "",
        accountBalance: "",
        depositBase: "",
        companyMonthlyDeposit: "",
        companyDepositRatio: "",
        personalDepositRatio: "",
        personalMonthlyDeposit: "",
      },

      accumulationEditDialog: false,
      accumulationFundEdit: {
        paytime: "",
        accountStatus: "",
        accountBalance: "",
        depositBase: "",
        companyMonthlyDeposit: "",
        companyDepositRatio: "",
        personalDepositRatio: "",
        personalMonthlyDeposit: "",
      },

      //账户状态
      accumulationFundsOptions: [
        {
          value: "0",
          label: "正常状态",
        },
        {
          value: "1",
          label: "封存状态",
        },
        {
          value: "2",
          label: "冻结状态",
        },
      ],

      socialSecurityTable: [], //社保数据数组
      socialSecurityloading: false,
      socialSecurityPageNo: 1, //公积金分页，总条数
      socialSecurityPageSize: 4,
      socialSecurityTotal: 0,
      socialSecurityPickerValue: "", //社保日期
      socialSecurityDialog: false,
      socialSecurityList: {
        userinformation: "",
        company: "",
        paytime: "",
        pension: "",
        medicalCare: "",
        unemployment: "",
        birth: "",
        workHurt: "",
      },
      checkSocialSecuritys: [], //选中社保（修改、批量删除）
      editSocialSecurityDialog: false,
      editSocialSecurityList: {
        userinformation: "",
        company: "",
        paytime: "",
        pension: "",
        medicalCare: "",
        unemployment: "",
        birth: "",
        workHurt: "",
      },

      resumeTable: [], //简历数组
      resumeLoading: false,

      contractTable: [], //合同数据数组
      contractLoading: false,

      creditRecordTable: [], //信用记录数据数组
      checkCreditRecord: [], //选中信用记录批量删除
      creditRecordLoading: false,
      creditRecordDialog: false,
      editCreditRecordDialog: false,
      creditRecordList: {
        time: "",
        record: "",
      },
      editCreditRecordList: {
        time: "",
        record: "",
      },
    };
  },

  mounted() {
    this.getCurrentDate();
    this.getSelectUserFound();
    this.cityS();
  },
  //合计
  updated() {	
			this.$nextTick(() => {
				this.$refs['salarys'].doLayout();
			})  
  },
  methods: {
    // 附表tab选项卡
    handleClick() {
      // console.log(this.attachedListNum);
      switch (this.attachedListNum) {
        case "0":
          this.getUserHirstyWork();
          break;
        case "1":
          this.getEnterpriseHealth();
          break;
        case "2":
          this.selectUserInformationIsHire();
          break;
        case "3":
          this.getUserSalary();
          break;
        case "4":
          this.getAccumulationFund();
          break;
        case "5":
          this.getSocialSecuCompany();
          break;
        case "6":
          this.getResume();
          break;
        case "7":
          this.selectUserContract();
          break;
        case "8":
          this.selectCreditHistory();
          break;
      }
    },
    //人才发现分页------------------------------------------
    peopleFoundHandleSize(val) {
      this.peopleFoundPageSize = val;
      this.peopleFoundPageNo = 1;
      this.getSelectUserFound();
    },
    peopleFoundHandleCurrent(val) {
      this.peopleFoundPageNo = val;
      this.getSelectUserFound();
    },
    selectiopeopleFound(val) {
      // console.log(val);
      this.worksExperienceTable = [];
      if (val.length >= 1) {
        this.userId = val[val.length - 1].id;
        this.addSalaryByUser.username = val[val.length - 1].realName;
        this.addSalaryByUser.phone = val[val.length - 1].phone;
        this.addSalaryByUser.idNumber = val[val.length - 1].idCard;
        this.addSalaryByUser.job = val[val.length - 1].job;
        this.addSalaryByUser.department = val[val.length - 1].department.id;
        this.addSalaryByUser.departmentName =
          val[val.length - 1].department.name;
      } else {
        this.userId = "";
      }
      // console.log("1", this.userId);

      this.handleClick();
    },
    getSelectUserFound() {
      //查询所有人员
      this.peopleFoundLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/selectUserFound",
        method: "get",
        params: {
          pageNo: this.peopleFoundPageNo,
          pageSize: this.peopleFoundPageSize,
        },
      }).then(({ data }) => {
        // console.log("所有人员", data);
        if (data) {
          this.peopleFoundTable = data.UserList;
          this.peopleFoundTotal = data.totalCount;
          this.peopleFoundLoading = false;
        }
      });
    },
    searchUsers() {
      //搜索所有人员
      this.peopleFoundLoading = true;
      //判断类似天津或者天津市，切割
      let cityOne = this.peopleFoundSearch.currentAddress.substring(0, 2);
      let cityTwo = this.peopleFoundSearch.currentAddress.substring(3, 5);
      if (cityOne == cityTwo) {
        this.peopleFoundSearch.currentAddress =
          this.peopleFoundSearch.currentAddress.substring(3);
      }
      this.$http({
        url: "/dlyrl/hr/discovery/searchUser",
        method: "get",
        params: {
          pageNo: this.peopleFoundPageNo,
          pageSize: this.peopleFoundPageSize,
          ...this.peopleFoundSearch,
        },
      }).then(({ data }) => {
        // console.log("搜索所有人员",data);
        if (data) {
          this.peopleFoundTable = data.userInformations;
          if (this.peopleFoundTable.length == 0) {
            this.peopleFoundTotal = 0;
          } else {
            this.peopleFoundTotal = data.totalCount;
          }
          this.peopleFoundLoading = false;
        }
      });
    },
    // sexDictionaries(row, column) {
    //   //性别字典
    //   if (row.sex == 0) {
    //     return "男";
    //   } else if (row.sex == 1) {
    //     return "女";
    //   }
    // },
    editPersonInfo(row){
      this.personInfoDialog=true;
      this.personInfo=row;
      // console.log(row,'row.')
      //性别字典
      if(this.personInfo.sex==0){
          this.personInfo.sex='男'
      }else if(this.personInfo.sex==1){
          this.personInfo.sex='女'
      }
      //学历字典
      if(this.personInfo.education==1){
          this.personInfo.education='中专'
      }else if(this.personInfo.education==2){
          this.personInfo.education='大专'
      }else if(this.personInfo.education==3){
          this.personInfo.education='高中'
      }else if(this.personInfo.education==4){
          this.personInfo.education='本科'
      }else if(this.personInfo.education==5){
          this.personInfo.education='硕士'
      }else if(this.personInfo.education==6){
          this.personInfo.education='博士'
      }else if(this.personInfo.education==7){
          this.personInfo.education='大专'
      }
      //驾照字典
      if(this.personInfo.drivingLicense==''){
          this.personInfo.drivingLicense=' '
      }else if(this.personInfo.drivingLicense==1){
          this.personInfo.drivingLicense='A2'
      }else if(this.personInfo.drivingLicense==10){
          this.personInfo.drivingLicense='D'
      }else if(this.personInfo.drivingLicense==11){
          this.personInfo.drivingLicense='E'
      }else if(this.personInfo.drivingLicense==12){
          this.personInfo.drivingLicense='F'
      }else if(this.personInfo.drivingLicense==13){
          this.personInfo.drivingLicense='M'
      }else if(this.personInfo.drivingLicense==14){
          this.personInfo.drivingLicense='N'
      }else if(this.personInfo.drivingLicense==15){
          this.personInfo.drivingLicense='P'
      }else if(this.personInfo.drivingLicense==2){
          this.personInfo.drivingLicense='A3'
      }else if(this.personInfo.drivingLicense==3){
          this.personInfo.drivingLicense='B1'
      }else if(this.personInfo.drivingLicense==4){
          this.personInfo.drivingLicense='B2'
      }else if(this.personInfo.drivingLicense==5){
          this.personInfo.drivingLicense='C1'
      }else if(this.personInfo.drivingLicense==6){
          this.personInfo.drivingLicense='C2'
      }else if(this.personInfo.drivingLicense==7){
          this.personInfo.drivingLicense='C3'
      }else if(this.personInfo.drivingLicense==8){
          this.personInfo.drivingLicense='C4'
      }else if(this.personInfo.drivingLicense==9){
          this.personInfo.drivingLicense='C5'
      }else if(this.personInfo.drivingLicense==0){
          this.personInfo.drivingLicense='A1'
      }
      //求职状态字典
      if(this.personInfo.jobSearchingStatus==0){
          this.personInfo.jobSearchingStatus='离职-随时到岗'
      }else if(this.personInfo.jobSearchingStatus==1){
          this.personInfo.jobSearchingStatus='在职-考虑机会'
      }else if(this.personInfo.jobSearchingStatus==2){
          this.personInfo.jobSearchingStatus='在职-暂不考虑'
      }
      //聘用状态字典
      if(this.personInfo.employmentStatus==4){
          this.personInfo.employmentStatus='已招聘(已签订合同)'
      }else if(this.personInfo.employmentStatus==5){
          this.personInfo.employmentStatus='已经聘(未签订合同)'
      }else if(this.personInfo.employmentStatus==6){
          this.personInfo.employmentStatus='已离职(已解除劳动合同)'
      }else if(this.personInfo.employmentStatus==7){
          this.personInfo.employmentStatus='无聘用关系'
      }
    },
    // ------------------------------------------------------
    //查询城市
    cityS() {
      this.$http({
        url: "/sys/area/treeData",
        method: "get",
      }).then(({ data }) => {
        this.valueData = data.treeData[0].children;
      });
    },
    // 搜索城市切换选项
    handleChange(e) {
      this.peopleFoundSearch.currentAddress = e.join("-");
      this.$refs.currentAddressChange.dropDownVisible = false; //监听值发生变化就关闭它
    },
    //点击label也可以进行选择
    handleSelect(event) {
      var that = this;
      this.$nextTick(() => {
        let d = document.getElementsByClassName("cascader1");
        if (d[0] && !d[0].onclick) {
          d[0].onclick = function (e) {
            if (e.target.className == "el-cascader-node__label") {
              e.target.previousElementSibling.click();
            }
          };
        }
      });
    },
    // ------------------------------------------------------
    resetsearchUsers() {
      //重置搜索所有人员
      this.peopleFoundSearch.realName = "";
      this.peopleFoundSearch.phone = "";
      this.peopleFoundSearch.sex = "";
      this.$refs.currentAddressChange.handleClear();
      this.getSelectUserFound();
    },
    deselectUserFound(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.UserFounds.toggleRowSelection(row);
        });
      } else {
        this.$refs.UserFounds.clearSelection();
      }
    },

    // ------------------------------------------------------
    getUserHirstyWork() {
      //查询历史工作记录
      this.UserHirstyWorkLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/getUserHirstyWork",
        method: "get",
        params: {
          userId: this.userId,
        },
      }).then(({ data }) => {
        // console.log("历史工作记录", data);
        if (data) {
          this.worksExperienceTable = data.list;
          this.UserHirstyWorkLoading = false;
        }
      });
    },
    selectUserHirstyWorks(val) {
      this.checkUserHirstyWorks = val;
    },
    insertUserHirstyWorks() {
      //新增历史工作记录
      this.$http({
        url: "/dlyrl/hr/discovery/insertUserHirstyWork",
        method: "post",
        params: {
          userinformation: this.userId,
          beginTime: this.insertUserHirstyWorkList.startTime,
          endingTime: this.insertUserHirstyWorkList.endTime,
          isleaveOffice: this.insertUserHirstyWorkList.isleaveOffice,
          uname: this.insertUserHirstyWorkList.uname,
          idCard: this.insertUserHirstyWorkList.idCard,
          jobs: this.insertUserHirstyWorkList.jobs,
          companyName: this.insertUserHirstyWorkList.companyName,
          department: this.insertUserHirstyWorkList.department,
          id: this.insertUserHirstyWorkList.id,
        },
      }).then(({ data }) => {
        // console.log("新增历史工作记录",data);
        if (data) {
          this.insertUserHirstyWorkDialog = false;
          this.getUserHirstyWork();
          this.insertUserHirstyWorkList.startTime = "";
          this.insertUserHirstyWorkList.endTime = "";
          this.insertUserHirstyWorkList.isleaveOffice = "";
          this.insertUserHirstyWorkList.uname = "";
          this.insertUserHirstyWorkList.idCard = "";
          this.insertUserHirstyWorkList.jobs = "";
          this.insertUserHirstyWorkList.companyName = "";
          this.insertUserHirstyWorkList.id = "";
          this.insertUserHirstyWorkList.department = "";
        }
      });
    },
    delUserHirstyWorks(id) {
      let ids = "";
      if (this.checkUserHirstyWorks.length > 0) {
        ids = this.checkUserHirstyWorks
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delUserHirstyWork",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getUserHirstyWork();
        });
      });
    },
    updateUserHirstyWorks(val) {
      // console.log(val.id);
      this.insertUserHirstyWorkList.id = val.id;
      this.insertUserHirstyWorkDialog = true;
      this.insertUserHirstyWorkList.startTime = val.startTime;
      this.insertUserHirstyWorkList.endTime = val.endTime;
      this.insertUserHirstyWorkList.isleaveOffice = val.isleaveOffice;
      this.insertUserHirstyWorkList.uname = val.uname;
      this.insertUserHirstyWorkList.idCard = val.idCard;
      this.insertUserHirstyWorkList.jobs = val.jobs;
      this.insertUserHirstyWorkList.companyName = val.companyName;
      this.insertUserHirstyWorkList.department = val.department;
    },

    //-------------------------------------------------------
    //体检分页
    medicalExaminationReportHandleSize(val) {
      this.medicalExaminationReportPageSize = val;
      this.medicalExaminationReportPageNo = 1;
      this.getEnterpriseHealth();
    },
    medicalExaminationReportHandleCurrent(val) {
      this.medicalExaminationReportPageNo = val;
      this.getEnterpriseHealth();
    },
    getEnterpriseHealth() {
      //查询体检报告
      this.enterpriseHealthLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/getEnterpriseHealth",
        method: "get",
        params: {
          userId: this.userId,
          pageNo: this.medicalExaminationReportPageNo,
          pageSize: this.medicalExaminationReportPageSize,
        },
      }).then(({ data }) => {
        // console.log("体检报告", data);
        if (data) {
          this.medicalExaminationReportTable = data.healthList;
          this.medicalExaminationReportTotal = data.totalCount;
          this.enterpriseHealthLoading = false;
        }
      });
    },
    selectenterpriseHealths(val) {
      this.checkMedicalExaminationReports = val;
    },
    saveHealt() {
      //新增 修改体检报告信息
      this.$http({
        url: "/dlyrl/hr/discovery/saveHealth",
        method: "post",
        params: {
          id: this.enterpriseHealthList.id,
          userinformation: this.userId,
          inspectAddress: this.enterpriseHealthList.inspectAddress,
          inspectTime: this.enterpriseHealthList.inspectTime,
          inspectReport: this.enterpriseHealthList.inspectReport,
          medicaldiagnosis: this.enterpriseHealthList.medicaldiagnosis,
          medicaltype: this.enterpriseHealthList.medicaltype,
          medicalaccessory: this.enterpriseHealthList.medicalaccessory,
        },
      }).then(({ data }) => {
        // console.log("新增体检报告", data);
        if (data && data.success) {
          this.enterpriseHealthDialog = false;
          this.getEnterpriseHealth();
          this.enterpriseHealthList.inspectAddress = "";
          this.enterpriseHealthList.inspectTime = "";
          this.enterpriseHealthList.inspectReport = "";
          this.enterpriseHealthList.uname = "";
          this.enterpriseHealthList.medicaldiagnosis = "";
          this.enterpriseHealthList.medicaltype = "";
          this.enterpriseHealthList.medicalaccessory = "";
          this.enterpriseHealthList.fileList = [];
        }
      });
    },
    updateEnterpriseHealths(val) {
      this.enterpriseHealthDialog = true;
      this.enterpriseHealthList.fileList = [];
      this.enterpriseHealthList.id = val.id;
      this.enterpriseHealthList.inspectAddress = val.inspectAddress;
      this.enterpriseHealthList.inspectTime = val.inspectTime;
      this.enterpriseHealthList.inspectReport = val.inspectReport;
      this.enterpriseHealthList.medicaldiagnosis = val.medicaldiagnosis;
      this.enterpriseHealthList.medicalaccessoryName = val.medicalaccessoryName;
      this.enterpriseHealthList.medicalaccessory = val.medicalaccessory;
      this.enterpriseHealthList.medicaltype = val.medicaltype;
      this.enterpriseHealthList.medicalaccessory.split("|").forEach((item) => {
        if (item.trim().length > 0) {
          this.enterpriseHealthList.fileList.push({
            name: decodeURIComponent(item.substring(item.lastIndexOf("/") + 1)),
            url: item,
          });
        }
      });
    },
    delHealth(id) {
      let ids = "";
      if (this.checkMedicalExaminationReports.length > 0) {
        ids = this.checkMedicalExaminationReports
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delHealth",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getEnterpriseHealth();
        });
      });
    },

    //--------------------------------------------------------
    //工伤分页
    injuryRecordHandleSize() {
      this.injuryRecordPageSize = val;
      this.injuryRecordPageNo = 1;
      this.selectUserInformationIsHire();
    },
    injuryRecordHandleCurrent() {
      this.injuryRecordPageNo = val;
      this.selectUserInformationIsHire();
    },
    selectUserInformationIsHire() {
      //查询工商记录
      this.injuryRecordLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/selectUserInformationIsHire",
        method: "get",
        params: {
          userId: this.userId,
          pageNo: this.injuryRecordPageNo,
          pageSize: this.injuryRecordPageSize,
        },
      }).then(({ data }) => {
        // console.log("工伤记录", data);
        if (data) {
          this.injuryRecordTable = data.workList;
          this.injuryRecordTotal = data.totalCount;
          this.injuryRecordLoading = false;
        }
      });
    },
    saveWorkInjury() {
      let url = "";
      if (this.WorkInjuryList.id != "") {
        url = "/dlyrl/hr/discovery/updateWorkInjury";
      } else {
        url = "/dlyrl/hr/discovery/saveWorkInjury";
      }
      this.$http({
        url: url,
        method: "post",
        params: {
          id: this.WorkInjuryList.id,
          userinformation: this.userId,
          date: this.WorkInjuryList.date,
          commercialocation: this.WorkInjuryList.commercialocation,
          businesslevel: this.WorkInjuryList.businesslevel,
          assignedunit: this.WorkInjuryList.assignedunit,
          constructionunit: this.WorkInjuryList.constructionunit,
          conuttionunit: this.WorkInjuryList.conuttionunit,
          laborserviceunit: this.WorkInjuryList.laborserviceunit,
          medicaldiagnosis: this.WorkInjuryList.medicaldiagnosis,
          medicaldiagnosisresult: this.WorkInjuryList.medicaldiagnosisresult,
        },
      }).then(({ data }) => {
        // console.log("新增工伤记录", data);
        if (data && data.success) {
          this.WorkInjuryDialog = false;
          this.selectUserInformationIsHire();
          this.WorkInjuryList.id = "";
          this.WorkInjuryList.date = "";
          this.WorkInjuryList.commercialocation = "";
          this.WorkInjuryList.businesslevel = "";
          this.WorkInjuryList.assignedunit = "";
          this.WorkInjuryList.constructionunit = "";
          this.WorkInjuryList.conuttionunit = "";
          this.WorkInjuryList.laborserviceunit = "";
          this.WorkInjuryList.medicaldiagnosis = "";
          this.WorkInjuryList.medicaldiagnosisresult = "";
          this.WorkInjuryList.fileList = [];
        }
      });
    },
    selectWorkInjury(val) {
      this.checkinjuryRecords = val;
    },
    delWorkInjury(id) {
      let ids = "";
      if (this.checkinjuryRecords.length > 0) {
        ids = this.checkinjuryRecords
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delWorkInjury",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.selectUserInformationIsHire();
        });
      });
    },
    updateWorkInjurys(val) {
      this.WorkInjuryList.fileList = [];
      this.WorkInjuryList.id = val.id;
      this.WorkInjuryList.date = val.time;
      this.WorkInjuryList.commercialocation = val.commercialocation;
      this.WorkInjuryList.businesslevel = val.businesslevel;
      this.WorkInjuryList.assignedunit = val.assignedunit;
      this.WorkInjuryList.constructionunit = val.constructionunit;
      this.WorkInjuryList.conuttionunit = val.conuttionunit;
      this.WorkInjuryList.laborserviceunit = val.laborserviceunit;
      this.WorkInjuryList.medicaldiagnosis = val.medicaldiagnosis;
      this.WorkInjuryList.medicaldiagnosisresult = val.medicaldiagnosisresult;
      this.WorkInjuryList.medicaldiagnosis.split("|").forEach((item) => {
        if (item.trim().length > 0) {
          this.WorkInjuryList.fileList.push({
            name: decodeURIComponent(item.substring(item.lastIndexOf("/") + 1)),
            url: item,
          });
        }
      });
      this.WorkInjuryDialog = true;
    },

    //--------------------------------------------------------
    //工资表日期改变重新调用
    salaryPicker(val) {
      this.salaryPickerValue = val;
      this.getUserSalary();
    },
    //工资选项卡
    salaryCheckChange(val) {
      this.checkSalary = val;
    },
    //工资表分页
    salaryHandleSize(val) {
      this.salaryPageSize = val;
      this.salaryPageNo = 1;
      this.getUserSalary();
    },
    salaryHandleCurrent(val) {
      this.salaryPageSize = val;
      this.getUserSalary();
    },
    getUserSalary() {
      //工资表查询
      this.userSalaryLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/getUserSalary",
        method: "get",
        params: {
          userId: this.userId,
          pageNo: this.salaryPageNo,
          pageSize: this.salaryPageSize,
        },
      }).then(({ data }) => {
        // console.log("工资表", data);
        if (data) {
          this.salaryTable = data.page;
          this.salaryTotal = data.totalCount;
          this.userSalaryLoading = false;
        }
      });
    },
    addSalarys() {
      this.addSalaryByUserDialog = true;
      this.$refs.addSalaryByUser.validate((valid) => {
        if (valid) {
          this.$http({
            url: "/dlyrl/hr/discovery/addSalary",
            method: "post",
            params: {
              id: this.addSalaryByUser.id,
              userinformation: this.userId,
              salYear: this.addSalaryByUser.salYear,
              openingbank: this.addSalaryByUser.openingbank,
              banknumber: this.addSalaryByUser.banknumber,
              bankcard: this.addSalaryByUser.bankcard,
              department: this.addSalaryByUser.department,
              job: this.addSalaryByUser.job,
              enterpriseInformation: this.addSalaryByUser.enterpriseInformation,
              idNumber: this.addSalaryByUser.idNumber,
              phone: this.addSalaryByUser.phone,
              shouldAttendanceDay: this.addSalaryByUser.shouldAttendanceDay,
              travelDays: this.addSalaryByUser.travelDays,
              leaveDays: this.addSalaryByUser.leaveDays,
              realityAttendanceDay: Number(
                this.addSalaryByUser.shouldAttendanceDay -
                  this.addSalaryByUser.travelDays -
                  this.addSalaryByUser.leaveDays
              ),
              basePay: this.addSalaryByUser.basePay,
              postWage: this.addSalaryByUser.postWage,
              meritPay: this.addSalaryByUser.meritPay,
              combinedBasic:
                Number(this.addSalaryByUser.basePay) +
                Number(this.addSalaryByUser.postWage) +
                Number(this.addSalaryByUser.meritPay),
              seniorityPay: this.addSalaryByUser.seniorityPay,
              mealAllowance: this.addSalaryByUser.mealAllowance,
              trafficAllowance: this.addSalaryByUser.trafficAllowance,
              commission: this.addSalaryByUser.commission,
              travelAllowance: this.addSalaryByUser.travelAllowance,
              attendanceBonus: this.addSalaryByUser.attendanceBonus,
              overtime: this.addSalaryByUser.overtime,
              communicateSubsidy: this.addSalaryByUser.communicateSubsidy,
              otherSupport: this.addSalaryByUser.otherSupport,
              totalWelfareBenefits:
                Number(this.addSalaryByUser.seniorityPay) +
                Number(this.addSalaryByUser.mealAllowance) +
                Number(this.addSalaryByUser.trafficAllowance) +
                Number(this.addSalaryByUser.commission) +
                Number(this.addSalaryByUser.travelAllowance) +
                Number(this.addSalaryByUser.attendanceBonus) +
                Number(this.addSalaryByUser.overtime) +
                Number(this.addSalaryByUser.communicateSubsidy) +
                Number(this.addSalaryByUser.otherSupport),
              shouldsalary:
                Number(this.addSalaryByUser.basePay) +
                Number(this.addSalaryByUser.postWage) +
                Number(this.addSalaryByUser.meritPay) +
                (Number(this.addSalaryByUser.seniorityPay) +
                  Number(this.addSalaryByUser.mealAllowance) +
                  Number(this.addSalaryByUser.trafficAllowance) +
                  Number(this.addSalaryByUser.commission) +
                  Number(this.addSalaryByUser.travelAllowance) +
                  Number(this.addSalaryByUser.attendanceBonus) +
                  Number(this.addSalaryByUser.overtime) +
                  Number(this.addSalaryByUser.communicateSubsidy) +
                  Number(this.addSalaryByUser.otherSupport)),
              basicOldAgePension: this.addSalaryByUser.basicOldAgePension,
              basicMedicalCare: this.addSalaryByUser.basicMedicalCare,
              unemploymentInsurance: this.addSalaryByUser.unemploymentInsurance,
              housingProvidentFund: this.addSalaryByUser.housingProvidentFund,
              individualIncomeTax: this.addSalaryByUser.individualIncomeTax,
              lately: this.addSalaryByUser.lately,
              leaveearly: this.addSalaryByUser.leaveearly,
              absenteeism: this.addSalaryByUser.absenteeism,
              otherDeductions: this.addSalaryByUser.otherDeductions,
              party: this.addSalaryByUser.party,
              workInjury: this.addSalaryByUser.workInjury,
              providentFund: this.addSalaryByUser.providentFund,
              pension: this.addSalaryByUser.pension,
              medical: this.addSalaryByUser.medical,
              unemployment: this.addSalaryByUser.unemployment,
              businessInjury: this.addSalaryByUser.businessInjury,
              otherFee: this.addSalaryByUser.otherFee,
              deductionsCombined:
                Number(this.addSalaryByUser.basicOldAgePension) +
                Number(this.addSalaryByUser.basicMedicalCare) +
                Number(this.addSalaryByUser.unemploymentInsurance) +
                Number(this.addSalaryByUser.housingProvidentFund) +
                Number(this.addSalaryByUser.individualIncomeTax) +
                Number(this.addSalaryByUser.lately) +
                Number(this.addSalaryByUser.leaveearly) +
                Number(this.addSalaryByUser.absenteeism) +
                Number(this.addSalaryByUser.otherDeductions) +
                Number(this.addSalaryByUser.party) +
                Number(this.addSalaryByUser.workInjury),
              totalFees:
                Number(this.addSalaryByUser.providentFund) +
                Number(this.addSalaryByUser.pension) +
                Number(this.addSalaryByUser.medical) +
                Number(this.addSalaryByUser.unemployment) +
                Number(this.addSalaryByUser.businessInjury) +
                Number(this.addSalaryByUser.otherFee),
              netPayroll:
                Number(this.addSalaryByUser.basePay) +
                Number(this.addSalaryByUser.postWage) +
                Number(this.addSalaryByUser.meritPay) +
                (Number(this.addSalaryByUser.seniorityPay) +
                  Number(this.addSalaryByUser.mealAllowance) +
                  Number(this.addSalaryByUser.trafficAllowance) +
                  Number(this.addSalaryByUser.commission) +
                  Number(this.addSalaryByUser.travelAllowance) +
                  Number(this.addSalaryByUser.attendanceBonus) +
                  Number(this.addSalaryByUser.overtime) +
                  Number(this.addSalaryByUser.communicateSubsidy) +
                  Number(this.addSalaryByUser.otherSupport)) -
                (Number(this.addSalaryByUser.basicOldAgePension) +
                  Number(this.addSalaryByUser.basicMedicalCare) +
                  Number(this.addSalaryByUser.unemploymentInsurance) +
                  Number(this.addSalaryByUser.housingProvidentFund) +
                  Number(this.addSalaryByUser.individualIncomeTax) +
                  Number(this.addSalaryByUser.lately) +
                  Number(this.addSalaryByUser.leaveearly) +
                  Number(this.addSalaryByUser.absenteeism) +
                  Number(this.addSalaryByUser.otherDeductions) +
                  Number(this.addSalaryByUser.party) +
                  Number(this.addSalaryByUser.workInjury)),
            },
          }).then(({ data }) => {
            // console.log("工资表", data);
            if (data && data.success) {
              this.addSalaryByUserDialog = false;
              this.addSalaryByUser.id = "";
              this.addSalaryByUser.userInformation = "";
              this.addSalaryByUser.salYear = "";
              this.addSalaryByUser.username = "";
              this.addSalaryByUser.department = "";
              this.addSalaryByUser.departmentName = "";
              this.addSalaryByUser.job = "";
              this.addSalaryByUser.enterpriseInformation = "";
              this.addSalaryByUser.idNumber = "";
              this.addSalaryByUser.phone = "";
              this.addSalaryByUser.shouldAttendanceDay = "";
              this.addSalaryByUser.travelDays = "";
              this.addSalaryByUser.leaveDays = "";
              this.addSalaryByUser.realityAttendanceDay = "";
              this.addSalaryByUser.basePay = "";
              this.addSalaryByUser.postWage = "";
              this.addSalaryByUser.meritPay = "";
              this.addSalaryByUser.combinedBasic = "";
              this.addSalaryByUser.seniorityPay = "";
              this.addSalaryByUser.mealAllowance = "";
              this.addSalaryByUser.trafficAllowance = "";
              this.addSalaryByUser.commission = "";
              this.addSalaryByUser.travelAllowance = "";
              this.addSalaryByUser.attendanceBonus = "";
              this.addSalaryByUser.overtime = "";
              this.addSalaryByUser.communicateSubsidy = "";
              this.addSalaryByUser.otherSupport = "";
              this.addSalaryByUser.totalWelfareBenefits = "";
              this.addSalaryByUser.shouldsalary = "";
              this.addSalaryByUser.basicOldAgePension = "";
              this.addSalaryByUser.basicMedicalCare = "";
              this.addSalaryByUser.unemploymentInsurance = "";
              this.addSalaryByUser.housingProvidentFund = "";
              this.addSalaryByUser.individualIncomeTax = "";
              this.addSalaryByUser.lately = "";
              this.addSalaryByUser.leaveearly = "";
              this.addSalaryByUser.absenteeism = "";
              this.addSalaryByUser.otherDeductions = "";
              this.addSalaryByUser.deductionsCombined = "";
              this.addSalaryByUser.netPayroll = "";
              this.addSalaryByUser.bankcard = "";
              this.addSalaryByUser.openingbank = "";
              this.addSalaryByUser.banknumber = "";
              this.addSalaryByUser.party = "";
              this.addSalaryByUser.workInjury = "";
              this.addSalaryByUser.providentFund = "";
              this.addSalaryByUser.pension = "";
              this.addSalaryByUser.medical = "";
              this.addSalaryByUser.unemployment = "";
              this.addSalaryByUser.businessInjury = "";
              this.addSalaryByUser.otherFee = "";
              this.addSalaryByUser.totalFees = "";
              this.$message.success(data.msg);
              this.getUserSalary();
            }
          });
        }
      });
    },
    delSalarys(id) {
      let ids = "";
      if (this.checkSalary.length > 0) {
        ids = this.checkSalary
          .map((item) => {
            return item.id;
          })
          .join(",");
      } else {
        ids = id;
      }
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delSalary",
          method: "post",
          params: { salaryIds: ids },
        }).then(({ data }) => {
          this.$message.success(data.msg);
          this.getUserSalary();
        });
      });
    },
    updateSalarys(val) {
      // console.log(val);
      this.addSalaryByUserDialog = true;
      this.addSalaryByUser.id = val.id;
      this.addSalaryByUser.enterpriseInformation = val.enterpriseInformation.id;
      this.addSalaryByUser.salYear = val.salYear;
      this.addSalaryByUser.username = val.username;
      (this.addSalaryByUser.department = val.department.id),
        (this.addSalaryByUser.departmentName = val.department.name);
      this.addSalaryByUser.job = val.job;
      this.addSalaryByUser.idNumber = val.idNumber;
      this.addSalaryByUser.phone = val.phone;
      this.addSalaryByUser.shouldAttendanceDay = val.shouldAttendanceDay;
      this.addSalaryByUser.travelDays = val.travelDays;
      this.addSalaryByUser.leaveDays = val.leaveDays;
      // this.addSalaryByUser.realityAttendanceDay=val.realityAttendanceDay;
      (this.addSalaryByUser.basePay = val.basePay),
        (this.addSalaryByUser.postWage = val.postWage);
      this.addSalaryByUser.meritPay = val.meritPay;
      this.addSalaryByUser.combinedBasic = val.combinedBasic;
      this.addSalaryByUser.seniorityPay = val.seniorityPay;
      this.addSalaryByUser.mealAllowance = val.mealAllowance;
      this.addSalaryByUser.trafficAllowance = val.trafficAllowance;
      this.addSalaryByUser.commission = val.commission;
      this.addSalaryByUser.travelAllowance = val.travelAllowance;
      this.addSalaryByUser.attendanceBonus = val.attendanceBonus;
      this.addSalaryByUser.overtime = val.overtime;
      this.addSalaryByUser.communicateSubsidy = val.communicateSubsidy;
      this.addSalaryByUser.otherSupport = val.otherSupport;
      // this.addSalaryByUser.totalWelfareBenefits=val.totalWelfareBenefits;
      // this.addSalaryByUser.shouldsalary=val.shouldsalary;
      this.addSalaryByUser.basicOldAgePension = val.basicOldAgePension;
      this.addSalaryByUser.basicMedicalCare = val.basicMedicalCare;
      this.addSalaryByUser.unemploymentInsurance = val.unemploymentInsurance;
      this.addSalaryByUser.housingProvidentFund = val.housingProvidentFund;
      this.addSalaryByUser.individualIncomeTax = val.individualIncomeTax;
      this.addSalaryByUser.lately = val.lately;
      this.addSalaryByUser.leaveearly = val.leaveearly;
      this.addSalaryByUser.absenteeism = val.absenteeism;
      this.addSalaryByUser.otherDeductions = val.otherDeductions;
      // this.addSalaryByUser.deductionsCombined=val.deductionsCombined;
      // this.addSalaryByUser.netPayroll=val.netPayroll;
      this.addSalaryByUser.bankcard = val.userinformation.bankcard;
      this.addSalaryByUser.openingbank = val.userinformation.openingbank;
      this.addSalaryByUser.banknumber = val.userinformation.banknumber;
      this.addSalaryByUser.party = val.party;
      this.addSalaryByUser.workInjury = val.workInjury;
      this.addSalaryByUser.providentFund = val.providentFund;
      this.addSalaryByUser.pension = val.pension;
      this.addSalaryByUser.medical = val.medical;
      this.addSalaryByUser.unemployment = val.unemployment;
      this.addSalaryByUser.businessInjury = val.businessInjury;
      this.addSalaryByUser.otherFee = val.otherFee;
      // totalFees:"",//企业费用合计
    },
    //工资取消选择
    chooseSalary(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.salarys.toggleRowSelection(row);
        });
      } else {
        this.$refs.salarys.clearSelection();
      }
    },
    salaryCheckChange(val) {
      this.checkSalary = val;
    },

    //--------------------------------------------------------
    //公积金日期改变重新调用
    accumulationFundPicker(val) {
      this.accumulationFundPickerValue = val;
      this.getAccumulationFund();
    },
    //公积金分页
    accumulationFundHandleSize(val) {
      this.accumulationFundPageNo = 1;
      this.accumulationFundPageSize = val;
      this.getAccumulationFund();
    },
    accumulationFundHandleCurrent(val) {
      this.accumulationFundPageNo = val;
      this.getAccumulationFund();
    },
    //查询公积金
    getAccumulationFund() {
      this.accumulationLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/getAccumulationFund",
        method: "get",
        params: {
          date: this.accumulationFundPickerValue,
          userId: this.userId,
          pageNo: this.accumulationFundPageNo,
          pageSize: this.accumulationFundPageSize,
        },
      }).then(({ data }) => {
        // console.log("公积金", data);
        if (data) {
          this.accumulationFundTable = data.accfundList;
          this.accumulationFundTotal = data.totalCount;
          this.accumulationLoading = false;
        }
      });
    },
    //账户状态字典
    accountStatus(row, column) {
      if (row.accountStatus == 0) {
        return "正常状态";
      } else if (row.accountStatus == 1) {
        return "封存状态";
      } else if (row.accountStatus == 2) {
        return "冻结状态";
      }
    },
    //新增公积金
    accumulationFundHealt() {
      this.$http({
        url: "/dlyrl/hr/discovery/addAccumulationFund",
        method: "post",
        params: {
          date: this.accumulationFundList.paytime,
          userinformation: this.userId,
          individualAccount: this.accumulationFundList.individualAccount,
          accountStatus: this.accumulationFundList.accountStatus,
          depositBase: this.accumulationFundList.depositBase,
          companyDepositRatio: this.accumulationFundList.companyDepositRatio,
          companyMonthlyDeposit:
            this.accumulationFundList.companyMonthlyDeposit,
          personalDepositRatio: this.accumulationFundList.personalDepositRatio,
          personalMonthlyDeposit:
            this.accumulationFundList.personalMonthlyDeposit,
          accountBalance: this.accumulationFundList.accountBalance,
        },
      }).then(({ data }) => {
        // console.log("公积金添加页面",data);
        if (data && data.success) {
          this.$message.success(data.msg);
          this.accumulationFundDialog = false;
          this.$refs["accumulationFundList"].resetFields();
          this.getAccumulationFund();
        }
      });
    },
    //编辑公积金
    EditaccumulationFund(row) {
      this.accumulationEditDialog = true;
      this.accumulationFundEdit = row;
    },
    //编辑公积金确认
    accumulationEditHealt() {
      this.$http({
        url: "/dlyrl/hr/discovery/addAccumulationFund",
        method: "post",
        params: {
          date: this.accumulationFundEdit.paytime,
          userinformation: this.userId,
          id: this.accumulationFundEdit.id,
          individualAccount: this.accumulationFundEdit.individualAccount,
          accountStatus: this.accumulationFundEdit.accountStatus,
          depositBase: this.accumulationFundEdit.depositBase,
          companyDepositRatio: this.accumulationFundEdit.companyDepositRatio,
          companyMonthlyDeposit:
            this.accumulationFundEdit.companyMonthlyDeposit,
          personalDepositRatio: this.accumulationFundEdit.personalDepositRatio,
          personalMonthlyDeposit:
            this.accumulationFundEdit.personalMonthlyDeposit,
          accountBalance: this.accumulationFundEdit.accountBalance,
        },
      }).then(({ data }) => {
        // console.log("公积金编辑机页面",data);
        if (data && data.success) {
          this.$message.success("修改成功");
          this.accumulationEditDialog = false;
          this.getAccumulationFund();
        }
      });
    },
    delaccumulationFund(id) {
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delAccumulationFund",
          method: "post",
          params: { fundIds: id },
        }).then(({ data }) => {
          if (data && data.success) {
            this.$message.success(data.msg);
            this.getAccumulationFund();
          }
        });
      });
    },
    //当前日期
    getCurrentDate() {
      var date = new Date();
      var y = date.getFullYear();
      var m =
        date.getMonth() + 1 < 10
          ? "0" + (date.getMonth() + 1)
          : date.getMonth() + 1;
      var d = date.getDate();
      this.salaryPickerValue = y + "-" + m; //工资表日期
      this.accumulationFundPickerValue = y + "-" + m; //公积金日期
      this.socialSecurityPickerValue = y + "-" + m; //社保日期
    },
    //--------------------------------------------------------
    //社保日期改变重新调用
    socialSecurityPicker(val) {
      this.socialSecurityPickerValue = val;
      this.getSocialSecuCompany();
    },
    //社保分页
    socialSecurityHandleSize(val) {
      this.socialSecurityPageNo = 1;
      this.socialSecurityPageSize = val;
      this.getSocialSecuCompany();
    },
    socialSecurityHandleCurrent(val) {
      this.socialSecurityPageNo = val;
      this.getSocialSecuCompany();
    },
    //社保日期改变重新调用
    asocialSecurityPicker(val) {
      this.socialSecurityPickerValue = val;
      this.getSocialSecuCompany();
    },
    //查询社保
    getSocialSecuCompany() {
      this.socialSecurityloading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/getSocialSecuCompany",
        method: "get",
        params: {
          date: this.socialSecurityPickerValue,
          userId: this.userId,
          pageNo: this.socialSecurityPageNo,
          pageSize: this.socialSecurityPageSize,
        },
      }).then(({ data }) => {
        // console.log("社保", data);
        if (data) {
          this.socialSecurityTable = data.page;
          this.socialSecurityTotal = data.totalCount;
          this.socialSecurityloading = false;
        }
      });
    },
    //社保 确定
    socialSecurityHealt() {
      this.$http({
        url: "/dlyrl/hr/discovery/addSocialSecuCompany",
        method: "post",
        params: {
          paytime: this.socialSecurityList.paytime,
          userinformation: this.userId,
          pension: this.socialSecurityList.pension,
          medicalCare: this.socialSecurityList.medicalCare,
          unemployment: this.socialSecurityList.unemployment,
          birth: this.socialSecurityList.birth,
          workHurt: this.socialSecurityList.workHurt,
        },
      }).then(({ data }) => {
        // console.log("社保添加页面",data);
        if (data && data.success) {
          this.$message.success(data.msg);
          this.socialSecurityDialog = false;
          this.$refs["socialSecurityList"].resetFields();
          this.getSocialSecuCompany();
        }
      });
    },
    //社保当前行编辑按钮
    redactSocialSecurity(row) {
      this.editSocialSecurityList = row;
      this.editSocialSecurityDialog = true;
    },
    //社保编辑页面确认按钮
    confirmRedactSocialSecuritys() {
      this.$http({
        url: "/dlyrl/hr/discovery/addSocialSecuCompany",
        method: "post",
        params: {
          paytime: this.editSocialSecurityList.paytime,
          userinformation: this.userId,
          pension: this.editSocialSecurityList.pension,
          medicalCare: this.editSocialSecurityList.medicalCare,
          unemployment: this.editSocialSecurityList.unemployment,
          birth: this.editSocialSecurityList.birth,
          workHurt: this.editSocialSecurityList.workHurt,
          id: this.editSocialSecurityList.id,
        },
      }).then(({ data }) => {
        // console.log("社保修改页面",data);
        if (data && data.success) {
          this.$message.success(data.msg);
          this.editSocialSecurityDialog = false;
          this.getSocialSecuCompany();
        }
      });
    },
    //社保当前行删除按钮
    delSocialSecurity(id) {
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delSocialSecuCompany",
          method: "post",
          params: { socialIds: id },
        }).then(({ data }) => {
          if (data && data.success) {
            this.$message.success(data.msg);
            this.getSocialSecuCompany();
          }
        });
      });
    },
    //社保选项卡
    socialSecuritys(val) {
      this.checkSocialSecuritys = val;
    },
    //社保批量删除按钮
    delSocialSecuritys() {
      let ids = this.checkSocialSecuritys
        .map((item) => {
          // console.log(item.id)
          return item.id;
        })
        .join(",");
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delSocialSecuCompany",
          method: "post",
          params: { socialIds: ids },
        }).then(({ data }) => {
          if (data && data.success) {
            this.$message.success(data.msg);
            this.getSocialSecuCompany();
          }
        });
      });
    },

    //-------------------------------------------------------
    //查询合同
    selectUserContract() {
      this.contractLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/selectUserContract",
        method: "get",
        params: {
          userId: this.userId,
        },
      }).then(({ data }) => {
        console.log("合同", data);
        if (data) {
          this.contractTable = data.contractUser;
          this.contractLoading = false;
        }
      });
    },
    //简历查询
    getResume() {
      this.resumeLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/selectUserInformationResume",
        method: "get",
        params: {
          userId: this.userId,
        },
      }).then(({ data }) => {
        // console.log("简历",data);
        if (data) {
          this.resumeTable = data.resumeInformation;
          this.resumeLoading = false;
        }
      });
    },

    //--------------------------------------------------------
    //信用记录 新增确定
    creditRecordHealt() {
      this.$http({
        url: "/dlyrl/hr/discovery/savaCreditHistory",
        method: "post",
        params: {
          time: this.creditRecordList.time,
          record: this.creditRecordList.record,
          userinfo: this.userId,
        },
      }).then(({ data }) => {
        // console.log("社保添加页面",data);
        if (data && data.success) {
          this.$message.success(data.msg);
          this.creditRecordDialog = false;
          this.$refs["creditRecordList"].resetFields();
          this.selectCreditHistory();
        }
      });
    },
    //信用记录 编辑
    editCreditRecord(row) {
      this.editCreditRecordDialog = true;
      this.editCreditRecordList = row;
    },
    //信用记录 编辑确定
    editCreditRecordHealt() {
      this.$http({
        url: "/dlyrl/hr/discovery/savaCreditHistory",
        method: "post",
        params: {
          time: this.editCreditRecordList.time,
          record: this.editCreditRecordList.record,
          userinfo: this.userId,
          id: this.editCreditRecordList.id,
        },
      }).then(({ data }) => {
        // console.log("社保添加页面",data);
        if (data && data.success) {
          this.$message.success(data.msg);
          this.editCreditRecordDialog = false;
          this.$refs["editCreditRecordList"].resetFields();
          this.selectCreditHistory();
        }
      });
    },
    //信用记录 删除
    delCreditRecord(id) {
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delCreditHistory",
          method: "post",
          params: { ids: id },
        }).then(({ data }) => {
          if (data && data.success) {
            this.$message.success(data.msg);
            this.selectCreditHistory();
          }
        });
      });
    },
    //信用记录选项卡
    creditRecordChange(val) {
      this.checkCreditRecord = val;
    },
    //信用记录 批量删除 checkCreditRecord
    delCreditRecords() {
      let ids = this.checkCreditRecord
        .map((item) => {
          // console.log(item.id)
          return item.id;
        })
        .join(",");
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/discovery/delCreditHistory",
          method: "post",
          params: { ids: ids },
        }).then(({ data }) => {
          if (data && data.success) {
            this.$message.success(data.msg);
            this.selectCreditHistory();
          }
        });
      });
    },
    //信用记录
    selectCreditHistory() {
      this.creditRecordLoading = true;
      this.$http({
        url: "/dlyrl/hr/discovery/selectCreditHistory",
        method: "get",
        params: {
          userid: this.userId,
        },
      }).then(({ data }) => {
        console.log("信用记录", data);
        if (data) {
          this.creditRecordTable = data.creditHistoryList;
          this.creditRecordLoading = false;
        }
      });
    },
  },
};
</script>